fix php access token setter

This commit is contained in:
wing328 2015-11-25 00:00:26 +08:00
parent 34a021cdb5
commit ddc4d8460d
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)