From 8b393358591a025f9789401bfdc6d8fc8e1fb69e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 28 Sep 2020 16:09:09 +0800 Subject: [PATCH] fix php test using getter (#7525) --- .../petstore/php/OpenAPIClient-php/tests/PetApiTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php index 69323946f20c..d8c2cb5901b1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php @@ -114,7 +114,7 @@ public function testGetPetByIdWithHttpInfo() $this->assertSame($status_code, 200); $this->assertSame($response_headers['Content-Type'], ['application/json']); } -/* comment out due to https://github.com/OpenAPITools/openapi-generator/pull/7376#issuecomment-699722244 + public function testFindPetByStatus() { $response = $this->api->findPetsByStatus('available'); @@ -122,13 +122,13 @@ public function testFindPetByStatus() $this->assertSame(get_class($response[0]), Pet::class); // verify the object is Pet foreach ($response as $pet) { - $this->assertSame($pet['status'], 'available'); + $this->assertSame($pet->getStatus(), 'available'); } $response = $this->api->findPetsByStatus('unknown_and_incorrect_status'); $this->assertCount(0, $response); } - */ + public function testUpdatePet() { $petId = 10001;