From 9f5f2ae977884454f6f87a76ab7efdade5273e03 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Fri, 16 Feb 2018 19:03:29 +0900 Subject: [PATCH 1/3] Regenerate PetApiTest, OrderTest The same test code as deleted is in the 'tests' directory. --- .../SwaggerClient-php/test/Api/PetApiTest.php | 245 ++---------------- .../test/Model/OrderTest.php | 145 ++--------- 2 files changed, 38 insertions(+), 352 deletions(-) diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Api/PetApiTest.php index 407b6a995ab..125a2c11162 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Api/PetApiTest.php @@ -5,8 +5,7 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,18 +17,7 @@ * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** @@ -49,59 +37,24 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class PetApiTest extends \PHPUnit_Framework_TestCase { + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass() + { + } + /** * Setup before running each test case */ public function setUp() { - // add a new pet (id 10005) to ensure the pet object is available for all the tests - - // increase memory limit to avoid fatal error due to findPetByStatus - // returning a lot of data - ini_set('memory_limit', '256M'); - - // for error reporting (need to run with php5.3 to get no warning) - //ini_set('display_errors', 1); - //error_reporting(~0); - // when running with php5.5, comment out below to skip the warning about - // using @ to handle file upload - //ini_set('display_startup_errors',1); - //ini_set('display_errors',1); - //error_reporting(-1); - - // enable debugging - //Configuration::$debug = true; - - // skip initializing the API client as it should be automatic - //$api_client = new ApiClient('http://petstore.swagger.io/v2'); - // new pet - $new_pet_id = 10005; - $new_pet = new Model\Pet; - $new_pet->setId($new_pet_id); - $new_pet->setName("PHP Unit Test"); - $new_pet->setPhotoUrls(array("http://test_php_unit_test.com")); - // new tag - $tag= new Model\Tag; - $tag->setId($new_pet_id); // use the same id as pet - $tag->setName("test php tag"); - // new category - $category = new Model\Category; - $category->setId($new_pet_id); // use the same id as pet - $category->setName("test php category"); - - $new_pet->setTags(array($tag)); - $new_pet->setCategory($category); - - $pet_api = new Api\PetApi(); - // add a new pet (model) - $add_response = $pet_api->addPet($new_pet); } /** @@ -109,10 +62,13 @@ public function setUp() */ public function tearDown() { - $new_pet_id = 10005; - $pet_api = new Api\PetApi(); - // delete the pet (model) - $pet_api->deletePet($new_pet_id); + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass() + { } /** @@ -123,20 +79,6 @@ public function tearDown() */ public function testAddPet() { - // initialize the API client - $new_pet_id = 10005; - $new_pet = new Model\Pet; - $new_pet->setId($new_pet_id); - $new_pet->setName("PHP Unit Test 2"); - $pet_api = new Api\PetApi(); - // add a new pet (model) - $add_response = $pet_api->addPet($new_pet); - // return nothing (void) - $this->assertSame($add_response, null); - // verify added Pet - $response = $pet_api->getPetById($new_pet_id); - $this->assertSame($response->getId(), $new_pet_id); - $this->assertSame($response->getName(), 'PHP Unit Test 2'); } /** @@ -147,56 +89,18 @@ public function testAddPet() */ public function testDeletePet() { - } /** - * Test getPetByStatus and verify by the "id" of the response + * Test case for findPetsByStatus + * + * Finds Pets by status. + * */ - public function testFindPetByStatus() + public function testFindPetsByStatus() { - // initialize the API client - $pet_api = new Api\PetApi(); - // return Pet (model) - $response = $pet_api->findPetsByStatus("available"); - $this->assertGreaterThan(0, count($response)); // at least one object returned - $this->assertSame(get_class($response[0]), "Swagger\\Client\\Model\\Pet"); // verify the object is Pet - // loop through result to ensure status is "available" - foreach ($response as $_pet) { - $this->assertSame($_pet['status'], "available"); - } - // test invalid status - $response = $pet_api->findPetsByStatus("unknown_and_incorrect_status"); - $this->assertSame(count($response), 0); // confirm no object returned } -// test currently broken, status cannot be empty -// /** -// * Test case for findPetsByStatus -// * -// * Finds Pets by status with empty response. -// * -// * Make sure empty arrays from a producer is actually returned as -// * an empty array and not some other value. At some point it was -// * returned as null because the code stumbled on PHP loose type -// * checking (not on empty array is true, same thing could happen -// * with careless use of empty()). -// * -// */ -// public function testFindPetsByStatusWithEmptyResponse() -// { -// $storeApi = new Api\PetApi(); -// // this call returns and empty array -// $response = $storeApi->findPetsByStatus(array()); -// -// // make sure this is an array as we want it to be -// $this->assertInternalType("array", $response); -// -// // make sure the array is empty just in case the petstore -// // server changes its output -// $this->assertEmpty($response); -// } - /** * Test case for findPetsByTags * @@ -205,18 +109,6 @@ public function testFindPetByStatus() */ public function testFindPetsByTags() { - $pet_api = new Api\PetApi(); - // return Pet (model) - $response = $pet_api->findPetsByTags("test php tag"); - $this->assertGreaterThan(0, count($response)); // at least one object returned - $this->assertSame(get_class($response[0]), "Swagger\\Client\\Model\\Pet"); // verify the object is Pet - // loop through result to ensure status is "available" - foreach ($response as $_pet) { - $this->assertSame($_pet['tags'][0]['name'], "test php tag"); - } - // test invalid status - $response = $pet_api->findPetsByTags("unknown_and_incorrect_tag"); - $this->assertSame(count($response), 0); // confirm no object returned } /** @@ -227,45 +119,6 @@ public function testFindPetsByTags() */ public function testGetPetById() { - // initialize the API client without host - $pet_id = 10005; // ID of pet that needs to be fetched - - $config = new Configuration(); - $config->setApiKey('api_key', '111222333444555'); - $pet_api = new Api\PetApi(null, $config); - // return Pet (model) - $response = $pet_api->getPetById($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getName(), 'PHP Unit Test'); - $this->assertSame($response->getPhotoUrls()[0], 'http://test_php_unit_test.com'); - $this->assertSame($response->getCategory()->getId(), $pet_id); - $this->assertSame($response->getCategory()->getName(), 'test php category'); - $this->assertSame($response->getTags()[0]->getId(), $pet_id); - $this->assertSame($response->getTags()[0]->getName(), 'test php tag'); - } - - /** - * test getPetByIdWithHttpInfo with a Pet object (id 10005) - */ - public function testGetPetByIdWithHttpInfo() - { - // initialize the API client without host - $pet_id = 10005; // ID of pet that needs to be fetched - - $config = new Configuration(); - $config->setApiKey('api_key', '111222333444555'); - $pet_api = new Api\PetApi(null, $config); - - // return Pet (model) - list($response, $status_code, $response_headers) = $pet_api->getPetByIdWithHttpInfo($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getName(), 'PHP Unit Test'); - $this->assertSame($response->getCategory()->getId(), $pet_id); - $this->assertSame($response->getCategory()->getName(), 'test php category'); - $this->assertSame($response->getTags()[0]->getId(), $pet_id); - $this->assertSame($response->getTags()[0]->getName(), 'test php tag'); - $this->assertSame($status_code, 200); - $this->assertSame($response_headers['Content-Type'], ['application/json']); } /** @@ -276,44 +129,6 @@ public function testGetPetByIdWithHttpInfo() */ public function testUpdatePet() { - $pet_id = 10001; // ID of pet that needs to be fetched - $pet_api = new Api\PetApi(); - // create updated pet object - $updated_pet = new Model\Pet; - $updated_pet->setId($pet_id); - $updated_pet->setName('updatePet'); // new name - $updated_pet->setStatus('pending'); // new status - // update Pet (model/json) - $update_response = $pet_api->updatePet($updated_pet); - // return nothing (void) - $this->assertSame($update_response, null); - // verify updated Pet - $response = $pet_api->getPetById($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getStatus(), 'pending'); - $this->assertSame($response->getName(), 'updatePet'); - } - - /** - * Test updatePetWithFormWithHttpInfo and verify by the "name" of the response - */ - public function testUpdatePetWithFormWithHttpInfo() - { - // initialize the API client - $pet_id = 10001; // ID of pet that needs to be fetched - $pet_api = new Api\PetApi(); - // update Pet (form) - list($update_response, $status_code, $http_headers) = $pet_api->updatePetWithFormWithHttpInfo( - $pet_id, - 'update pet with form with http info' - ); - // return nothing (void) - $this->assertNull($update_response); - $this->assertSame($status_code, 200); - $this->assertSame($http_headers['Content-Type'], ['application/json']); - $response = $pet_api->getPetById($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getName(), 'update pet with form with http info'); } /** @@ -324,16 +139,6 @@ public function testUpdatePetWithFormWithHttpInfo() */ public function testUpdatePetWithForm() { - $pet_id = 10001; // ID of pet that needs to be fetched - $pet_api = new Api\PetApi(); - // update Pet (form) - $update_response = $pet_api->updatePetWithForm($pet_id, 'update pet with form', 'sold'); - // return nothing (void) - $this->assertSame($update_response, null); - $response = $pet_api->getPetById($pet_id); - $this->assertSame($response->getId(), $pet_id); - $this->assertSame($response->getName(), 'update pet with form'); - $this->assertSame($response->getStatus(), 'sold'); } /** @@ -344,11 +149,5 @@ public function testUpdatePetWithForm() */ public function testUploadFile() { - $pet_api = new Api\PetApi(); - // upload file - $pet_id = 10001; - $response = $pet_api->uploadFile($pet_id, "test meta", "./composer.json"); - // return ApiResponse - $this->assertInstanceOf('Swagger\Client\Model\ApiResponse', $response); } } diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/OrderTest.php index d197cffa653..7b0c1551d44 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/OrderTest.php @@ -6,8 +6,7 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -19,18 +18,7 @@ * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** @@ -39,7 +27,7 @@ * Please update the test case below to test the model. */ -namespace Swagger\Client\Model; +namespace Swagger\Client; /** * OrderTest Class Doc Comment @@ -47,49 +35,45 @@ * @category Class * @description Order * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class OrderTest extends \PHPUnit_Framework_TestCase { /** - * Setup before running each test case + * Setup before running any test case */ public static function setUpBeforeClass() { + } + /** + * Setup before running each test case + */ + public function setUp() + { } /** * Clean up after running each test case */ - public static function tearDownAfterClass() + public function tearDown() { - } /** - * Test "Order" + * Clean up after running all test cases */ - public function testOrder() + public static function tearDownAfterClass() { - // initialize the API client - $order = new Order(); - - $order->setStatus("placed"); - $this->assertSame("placed", $order->getStatus()); } /** - * @expectedException InvalidArgumentException + * Test "Order" */ - public function testOrderException() + public function testOrder() { - // initialize the API client - $order = new Order(); - $order->setStatus("invalid_value"); } /** @@ -97,7 +81,6 @@ public function testOrderException() */ public function testPropertyId() { - } /** @@ -105,7 +88,6 @@ public function testPropertyId() */ public function testPropertyPetId() { - } /** @@ -113,7 +95,6 @@ public function testPropertyPetId() */ public function testPropertyQuantity() { - } /** @@ -121,7 +102,6 @@ public function testPropertyQuantity() */ public function testPropertyShipDate() { - } /** @@ -129,8 +109,6 @@ public function testPropertyShipDate() */ public function testPropertyStatus() { - $this->assertSame(Order::STATUS_PLACED, "placed"); - $this->assertSame(Order::STATUS_APPROVED, "approved"); } /** @@ -138,96 +116,5 @@ public function testPropertyStatus() */ public function testPropertyComplete() { - - } - - // test deseralization of order - public function testDeserializationOfOrder() - { - $order_json = <<assertInstanceOf('Swagger\Client\Model\Order', $order); - $this->assertSame(10, $order->getId()); - $this->assertSame(20, $order->getPetId()); - $this->assertSame(30, $order->getQuantity()); - $this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $order->getShipDate()); - $this->assertSame("placed", $order->getStatus()); - $this->assertSame(false, $order->getComplete()); - } - - // test deseralization of array of array of order - public function testDeserializationOfArrayOfArrayOfOrder() - { - $order_json = <<assertArrayHasKey(0, $order); - $this->assertArrayHasKey(0, $order[0]); - $_order = $order[0][0]; - $this->assertInstanceOf('Swagger\Client\Model\Order', $_order); - $this->assertSame(10, $_order->getId()); - $this->assertSame(20, $_order->getPetId()); - $this->assertSame(30, $_order->getQuantity()); - $this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate()); - $this->assertSame("placed", $_order->getStatus()); - $this->assertSame(false, $_order->getComplete()); } - - // test deseralization of map of map of order - public function testDeserializationOfMapOfMapOfOrder() - { - $order_json = <<assertArrayHasKey('test', $order); - $this->assertArrayHasKey('test2', $order['test']); - $_order = $order['test']['test2']; - $this->assertInstanceOf('Swagger\Client\Model\Order', $_order); - $this->assertSame(10, $_order->getId()); - $this->assertSame(20, $_order->getPetId()); - $this->assertSame(30, $_order->getQuantity()); - $this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate()); - $this->assertSame("placed", $_order->getStatus()); - $this->assertSame(false, $_order->getComplete()); - } - } From c906addedb37eb171113b3ac29eff8887c50547f Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Fri, 16 Feb 2018 19:13:23 +0900 Subject: [PATCH 2/3] Move test code 'test' -> 'tests', and Regenerate test/Model/PetTest.php --- .../SwaggerClient-php/test/Model/PetTest.php | 49 ++++++------------- .../php/SwaggerClient-php/tests/PetTest.php | 18 +++++++ 2 files changed, 33 insertions(+), 34 deletions(-) create mode 100644 samples/client/petstore/php/SwaggerClient-php/tests/PetTest.php diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/PetTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/PetTest.php index b40d6c35e3e..8e4c92eec5c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/PetTest.php @@ -6,8 +6,7 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -19,18 +18,7 @@ * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** @@ -47,45 +35,45 @@ * @category Class * @description Pet * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class PetTest extends \PHPUnit_Framework_TestCase { /** - * Setup before running each test case + * Setup before running any test case */ public static function setUpBeforeClass() { + } + /** + * Setup before running each test case + */ + public function setUp() + { } /** * Clean up after running each test case */ - public static function tearDownAfterClass() + public function tearDown() { - } /** - * Test "Pet" + * Clean up after running all test cases */ - public function testPet() + public static function tearDownAfterClass() { - } /** - * test empty object serialization + * Test "Pet" */ - public function testEmptyPetSerialization() + public function testPet() { - $new_pet = new Model\Pet; - // the empty object should be serialised to {} - $this->assertSame("{}", "$new_pet"); } /** @@ -93,7 +81,6 @@ public function testEmptyPetSerialization() */ public function testPropertyId() { - } /** @@ -101,7 +88,6 @@ public function testPropertyId() */ public function testPropertyCategory() { - } /** @@ -109,7 +95,6 @@ public function testPropertyCategory() */ public function testPropertyName() { - } /** @@ -117,7 +102,6 @@ public function testPropertyName() */ public function testPropertyPhotoUrls() { - } /** @@ -125,7 +109,6 @@ public function testPropertyPhotoUrls() */ public function testPropertyTags() { - } /** @@ -133,7 +116,5 @@ public function testPropertyTags() */ public function testPropertyStatus() { - } - } diff --git a/samples/client/petstore/php/SwaggerClient-php/tests/PetTest.php b/samples/client/petstore/php/SwaggerClient-php/tests/PetTest.php new file mode 100644 index 00000000000..60ce604c522 --- /dev/null +++ b/samples/client/petstore/php/SwaggerClient-php/tests/PetTest.php @@ -0,0 +1,18 @@ +assertSame("{}", "$new_pet"); + } +} From 4464957e58dafbc16d5335889f94e4cf1790918a Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Fri, 16 Feb 2018 19:19:03 +0900 Subject: [PATCH 3/3] Regenerate 'test' directory rm -rf samples/client/petstore/php/SwaggerClient-php/test && bin/php-petstore.sh --- .../test/Api/AnotherFakeApiTest.php | 2 +- .../test/Api/FakeApiTest.php | 105 ++++++++++---- .../test/Api/FakeClassnameTags123ApiTest.php | 2 +- .../Api/Fake_classname_tags123ApiTest.php | 83 ----------- .../test/Api/StoreApiTest.php | 2 +- .../Model/AdditionalPropertiesClassTest.php | 56 +++++--- .../test/Model/AnimalFarmTest.php | 7 +- .../test/Model/AnimalTest.php | 56 +++++--- .../test/Model/ApiResponseTest.php | 63 ++++++--- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 43 +++--- .../test/Model/ArrayOfNumberOnlyTest.php | 43 +++--- .../test/Model/ArrayTestTest.php | 57 +++++--- .../test/Model/CapitalizationTest.php | 19 +-- .../SwaggerClient-php/test/Model/CatTest.php | 49 ++++--- .../test/Model/CategoryTest.php | 56 +++++--- .../test/Model/ClassModelTest.php | 14 +- .../test/Model/ClientTest.php | 31 +--- .../test/Model/DefaultErrorTest.php | 101 ------------- .../SwaggerClient-php/test/Model/DogTest.php | 49 ++++--- .../test/Model/EnumArraysTest.php | 40 ++---- .../test/Model/EnumClassTest.php | 7 +- .../test/Model/EnumTestTest.php | 7 +- .../test/Model/ErrorTest.php | 101 ------------- .../test/Model/FormatTestTest.php | 133 +++++++++++++++--- .../test/Model/HasOnlyReadOnlyTest.php | 50 ++++--- .../test/Model/MapTestTest.php | 50 ++++--- ...ertiesAndAdditionalPropertiesClassTest.php | 63 ++++++--- .../test/Model/Model200ResponseTest.php | 56 +++++--- .../test/Model/ModelListTest.php | 31 +--- .../test/Model/ModelReturnTest.php | 49 ++++--- .../SwaggerClient-php/test/Model/NameTest.php | 70 ++++++--- .../test/Model/NumberOnlyTest.php | 43 +++--- .../test/Model/OuterBooleanTest.php | 13 +- .../test/Model/OuterCompositeTest.php | 16 +-- .../test/Model/OuterEnumTest.php | 13 +- .../test/Model/OuterNumberTest.php | 13 +- .../test/Model/OuterStringTest.php | 13 +- .../test/Model/ReadOnlyFirstTest.php | 56 +++++--- .../test/Model/SpecialModelNameTest.php | 49 ++++--- .../SwaggerClient-php/test/Model/TagTest.php | 56 +++++--- .../SwaggerClient-php/test/Model/UserTest.php | 98 ++++++++++--- 41 files changed, 990 insertions(+), 875 deletions(-) delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Api/Fake_classname_tags123ApiTest.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/DefaultErrorTest.php delete mode 100644 samples/client/petstore/php/SwaggerClient-php/test/Model/ErrorTest.php diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Api/AnotherFakeApiTest.php index 4d2611db6de..372bf5935e4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Api/AnotherFakeApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeApiTest.php index c1ba9f2e8d6..06aefbc78d2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeApiTest.php @@ -5,31 +5,19 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ /** - * Swagger Petstore =end + * Swagger Petstore * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 =end - * Contact: apiteam@swagger.io =end + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** @@ -41,7 +29,6 @@ namespace Swagger\Client; use \Swagger\Client\Configuration; -use \Swagger\Client\ApiClient; use \Swagger\Client\ApiException; use \Swagger\Client\ObjectSerializer; @@ -50,8 +37,7 @@ * * @category Class * @package Swagger\Client - * @author http://github.com/swagger-api/swagger-codegen - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2 + * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class FakeApiTest extends \PHPUnit_Framework_TestCase @@ -62,7 +48,6 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - } /** @@ -70,7 +55,6 @@ public static function setUpBeforeClass() */ public function setUp() { - } /** @@ -78,7 +62,6 @@ public function setUp() */ public function tearDown() { - } /** @@ -86,7 +69,56 @@ public function tearDown() */ public static function tearDownAfterClass() { + } + /** + * Test case for fakeOuterBooleanSerialize + * + * . + * + */ + public function testFakeOuterBooleanSerialize() + { + } + + /** + * Test case for fakeOuterCompositeSerialize + * + * . + * + */ + public function testFakeOuterCompositeSerialize() + { + } + + /** + * Test case for fakeOuterNumberSerialize + * + * . + * + */ + public function testFakeOuterNumberSerialize() + { + } + + /** + * Test case for fakeOuterStringSerialize + * + * . + * + */ + public function testFakeOuterStringSerialize() + { + } + + /** + * Test case for testClientModel + * + * To test \"client\" model. + * + */ + public function testTestClientModel() + { } /** @@ -97,18 +129,35 @@ public static function tearDownAfterClass() */ public function testTestEndpointParameters() { - } /** - * Test case for testEnumQueryParameters + * Test case for testEnumParameters * - * To test enum query parameters. + * To test enum parameters. * */ - public function testTestEnumQueryParameters() + public function testTestEnumParameters() { + } + /** + * Test case for testInlineAdditionalProperties + * + * test inline additionalProperties. + * + */ + public function testTestInlineAdditionalProperties() + { } + /** + * Test case for testJsonFormData + * + * test json serialization of form data. + * + */ + public function testTestJsonFormData() + { + } } diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeClassnameTags123ApiTest.php index ccb4ee71dde..564df7c6ea0 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * Generated by: https://github.com/swagger-api/swagger-codegen.git - * + * Swagger Codegen version: 2.4.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Api/Fake_classname_tags123ApiTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Api/Fake_classname_tags123ApiTest.php deleted file mode 100644 index b9b64aeca97..00000000000 --- a/samples/client/petstore/php/SwaggerClient-php/test/Api/Fake_classname_tags123ApiTest.php +++ /dev/null @@ -1,83 +0,0 @@ -