Merge pull request #1611 from wing328/php_fix_accesstoken

[PHP] fix access token setter
This commit is contained in:
wing328 2015-11-25 10:58:21 +08:00
commit cf947811df
3 changed files with 6 additions and 2 deletions

View File

@ -211,7 +211,7 @@ class Configuration
*/
public function setAccessToken($accessToken)
{
$this->$accessToken = $accessToken;
$this->accessToken = $accessToken;
return $this;
}

View File

@ -211,7 +211,7 @@ class Configuration
*/
public function setAccessToken($accessToken)
{
$this->$accessToken = $accessToken;
$this->accessToken = $accessToken;
return $this;
}

View File

@ -82,6 +82,10 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
$this->assertNotEquals($apiClient3, $apiClient4);
// customied pet api not using the old pet api's api client
$this->assertNotEquals($pet_api2->getApiClient(), $pet_api3->getApiClient());
// test access token
$api_client->getConfig()->setAccessToken("testing_only");
$this->assertSame('testing_only', $api_client->getConfig()->getAccessToken());
}
// test getPetById with a Pet object (id 10005)