mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
Merge pull request #1611 from wing328/php_fix_accesstoken
[PHP] fix access token setter
This commit is contained in:
commit
cf947811df
@ -211,7 +211,7 @@ class Configuration
|
||||
*/
|
||||
public function setAccessToken($accessToken)
|
||||
{
|
||||
$this->$accessToken = $accessToken;
|
||||
$this->accessToken = $accessToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ class Configuration
|
||||
*/
|
||||
public function setAccessToken($accessToken)
|
||||
{
|
||||
$this->$accessToken = $accessToken;
|
||||
$this->accessToken = $accessToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user