Skip to content

Commit b06850c

Browse files
committed
Rename route to path in client class and tests
1 parent 85226ef commit b06850c

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎lib/Github/Client.php‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,31 +87,31 @@ public function deAuthenticate()
8787
}
8888

8989
/**
90-
* Call any route, GET method
90+
* Call any path, GET method
9191
* Ex: $api->get('repos/show/my-username/my-repo')
9292
*
93-
* @param string $route the GitHub route
93+
* @param string $path the GitHub path
9494
* @param array $parameters GET parameters
9595
* @param array $requestOptions reconfigure the request
9696
* @return array data returned
9797
*/
98-
public function get($route, array $parameters = array(), $requestOptions = array())
98+
public function get($path, array $parameters = array(), $requestOptions = array())
9999
{
100-
return $this->getHttpClient()->get($route, $parameters, $requestOptions);
100+
return $this->getHttpClient()->get($path, $parameters, $requestOptions);
101101
}
102102

103103
/**
104-
* Call any route, POST method
104+
* Call any path, POST method
105105
* Ex: $api->post('repos/show/my-username', array('email' => 'my-new-email@provider.org'))
106106
*
107-
* @param string $route the GitHub route
107+
* @param string $path the GitHub path
108108
* @param array $parameters POST parameters
109109
* @param array $requestOptions reconfigure the request
110110
* @return array data returned
111111
*/
112-
public function post($route, array $parameters = array(), $requestOptions = array())
112+
public function post($path, array $parameters = array(), $requestOptions = array())
113113
{
114-
return $this->getHttpClient()->post($route, $parameters, $requestOptions);
114+
return $this->getHttpClient()->post($path, $parameters, $requestOptions);
115115
}
116116

117117
/**

‎test/Github/Tests/ClientTest.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ public function testDeauthenticate()
5353

5454
public function testGet()
5555
{
56-
$route = '/some/route';
56+
$path = '/some/path';
5757
$parameters = array('a' => 'b');
5858
$options = array('c' => 'd');
5959

6060
$httpClient = $this->getHttpClientMock();
6161
$httpClient->expects($this->once())
6262
->method('get')
63-
->with($route, $parameters, $options);
63+
->with($path, $parameters, $options);
6464

6565
$client = $this->getClientMockBuilder()
6666
->setMethods(array('getHttpClient'))
@@ -70,19 +70,19 @@ public function testGet()
7070
->with()
7171
->will($this->returnValue($httpClient));
7272

73-
$client->get($route, $parameters, $options);
73+
$client->get($path, $parameters, $options);
7474
}
7575

7676
public function testPost()
7777
{
78-
$route = '/some/route';
78+
$path = '/some/path';
7979
$parameters = array('a' => 'b');
8080
$options = array('c' => 'd');
8181

8282
$httpClient = $this->getHttpClientMock();
8383
$httpClient->expects($this->once())
8484
->method('post')
85-
->with($route, $parameters, $options);
85+
->with($path, $parameters, $options);
8686

8787
$client = $this->getClientMockBuilder()
8888
->setMethods(array('getHttpClient'))
@@ -92,7 +92,7 @@ public function testPost()
9292
->with()
9393
->will($this->returnValue($httpClient));
9494

95-
$client->post($route, $parameters, $options);
95+
$client->post($path, $parameters, $options);
9696
}
9797

9898
public function testDefaultApi()

0 commit comments

Comments
 (0)