From a86b66281449c16b6816f10d077292e58e2e1469 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:01:26 +0900 Subject: [PATCH 01/14] Bump minimum required version to PHP7.1 ref: http://php.net/supported-versions.php --- .../openapi-generator/src/main/resources/php/composer.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache index e4860c99bf18..d9978541b222 100644 --- a/modules/openapi-generator/src/main/resources/php/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php/composer.mustache @@ -21,7 +21,7 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", From c6a7dc6d8eeb0ab53d4c7a8dcbfe25807f93cec2 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:28:53 +0900 Subject: [PATCH 02/14] Bump phpunit --- .../openapi-generator/src/main/resources/php/composer.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache index d9978541b222..dffab761e9a7 100644 --- a/modules/openapi-generator/src/main/resources/php/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php/composer.mustache @@ -28,7 +28,7 @@ "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^7.4", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.12" }, From 80eb44fb7ef20d66554541dc3fd8c9666d237100 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:33:17 +0900 Subject: [PATCH 03/14] Update [api|model]_test.mustache --- .../src/main/resources/php/api_test.mustache | 3 ++- .../src/main/resources/php/model_test.mustache | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/api_test.mustache b/modules/openapi-generator/src/main/resources/php/api_test.mustache index 2a1c11368c36..a49b3eb786ad 100644 --- a/modules/openapi-generator/src/main/resources/php/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/php/api_test.mustache @@ -21,6 +21,7 @@ namespace {{invokerPackage}}; use \{{invokerPackage}}\Configuration; use \{{invokerPackage}}\ApiException; use \{{invokerPackage}}\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * {{classname}}Test Class Doc Comment @@ -30,7 +31,7 @@ use \{{invokerPackage}}\ObjectSerializer; * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -{{#operations}}class {{classname}}Test extends \PHPUnit_Framework_TestCase +{{#operations}}class {{classname}}Test extends TestCase { /** diff --git a/modules/openapi-generator/src/main/resources/php/model_test.mustache b/modules/openapi-generator/src/main/resources/php/model_test.mustache index d84105dfffc9..7084f59fcd46 100644 --- a/modules/openapi-generator/src/main/resources/php/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_test.mustache @@ -21,6 +21,8 @@ namespace {{invokerPackage}}; +use PHPUnit\Framework\TestCase; + /** * {{classname}}Test Class Doc Comment * @@ -30,7 +32,7 @@ namespace {{invokerPackage}}; * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class {{classname}}Test extends \PHPUnit_Framework_TestCase +class {{classname}}Test extends TestCase { /** From 739891eab9180fd0052908e5cb72223b9d66c8f9 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:35:56 +0900 Subject: [PATCH 04/14] Update samples bin/openapi3/php-petstore.sh --- .../client/petstore/php/OpenAPIClient-php/composer.json | 4 ++-- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 3 ++- .../php/OpenAPIClient-php/test/Api/DefaultApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 3 ++- .../test/Api/FakeClassnameTags123ApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 3 ++- .../test/Model/AdditionalPropertiesClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/AnimalFarmTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 4 +++- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 4 +++- .../OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/ClientTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 4 +++- .../OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/FooTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObject1Test.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObject2Test.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObject3Test.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObject4Test.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObject5Test.php | 4 +++- .../php/OpenAPIClient-php/test/Model/InlineObjectTest.php | 4 +++- .../test/Model/InlineResponseDefaultTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php | 4 +++- .../Model/MixedPropertiesAndAdditionalPropertiesClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/Model200ResponseTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 4 +++- 52 files changed, 148 insertions(+), 53 deletions(-) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json index 45b3c6972619..e413b1364a1f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^7.4", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.12" }, diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 8caf0e3e19f1..8c4febe6bf2a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * AnotherFakeApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnotherFakeApiTest extends \PHPUnit_Framework_TestCase +class AnotherFakeApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php index 72b8e50744bb..21f8e964c07e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * DefaultApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class DefaultApiTest extends \PHPUnit_Framework_TestCase +class DefaultApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index eabfd782201f..bd8bb23f6bb4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * FakeApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FakeApiTest extends \PHPUnit_Framework_TestCase +class FakeApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index f417940ad6d3..c204813b86e0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * FakeClassnameTags123ApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FakeClassnameTags123ApiTest extends \PHPUnit_Framework_TestCase +class FakeClassnameTags123ApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 4d6a983f0cf6..c736f7cf0c7b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * PetApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class PetApiTest extends \PHPUnit_Framework_TestCase +class PetApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 421a35f0aaf3..605c2c146060 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * StoreApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class StoreApiTest extends \PHPUnit_Framework_TestCase +class StoreApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 7bc35cb3a05b..e3421d700d66 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * UserApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class UserApiTest extends \PHPUnit_Framework_TestCase +class UserApiTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 8f0bf5fba6be..8a265e6111f9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AdditionalPropertiesClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase +class AdditionalPropertiesClassTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index 2632576cb70c..776d096ebc81 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AnimalFarmTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnimalFarmTest extends \PHPUnit_Framework_TestCase +class AnimalFarmTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 4c8eee3facb2..308f5764fd91 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AnimalTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnimalTest extends \PHPUnit_Framework_TestCase +class AnimalTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index a2ae65b04846..4f2761a6fec3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ApiResponseTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ApiResponseTest extends \PHPUnit_Framework_TestCase +class ApiResponseTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index be40731bc175..b302a5c9f8e4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayOfArrayOfNumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayOfArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase +class ArrayOfArrayOfNumberOnlyTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 48c90fc4daeb..d62f69a8c405 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayOfNumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase +class ArrayOfNumberOnlyTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index 58fd6dd10738..d0d4908c40ed 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayTestTest extends \PHPUnit_Framework_TestCase +class ArrayTestTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index f2e9cbe17333..a7509d59015d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CapitalizationTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CapitalizationTest extends \PHPUnit_Framework_TestCase +class CapitalizationTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 768be0105585..9ec71a648897 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CatTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CatTest extends \PHPUnit_Framework_TestCase +class CatTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 800af18fa538..e6ce1dc396b8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CategoryTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CategoryTest extends \PHPUnit_Framework_TestCase +class CategoryTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 387e35ca7508..d3a6a966df3d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ClassModelTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ClassModelTest extends \PHPUnit_Framework_TestCase +class ClassModelTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index b2a0fcbadcf3..fa9e2a99caa0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ClientTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ClientTest extends \PHPUnit_Framework_TestCase +class ClientTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 5c40d07c089c..f2b1cf3cc088 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * DogTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class DogTest extends \PHPUnit_Framework_TestCase +class DogTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 476961f26f45..a78404d96823 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumArraysTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumArraysTest extends \PHPUnit_Framework_TestCase +class EnumArraysTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 887f6ecf00a1..b122efb317a0 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumClassTest extends \PHPUnit_Framework_TestCase +class EnumClassTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index ae762409e44a..333627d07abb 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumTestTest extends \PHPUnit_Framework_TestCase +class EnumTestTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index 223c6c2614f8..12225a23e4ca 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FileSchemaTestClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FileSchemaTestClassTest extends \PHPUnit_Framework_TestCase +class FileSchemaTestClassTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 843c99320da2..73e1a3ea0af4 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FileTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FileTest extends \PHPUnit_Framework_TestCase +class FileTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php index 99d6c9de998c..f600a42abf8e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FooTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FooTest extends \PHPUnit_Framework_TestCase +class FooTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 48d76711345a..a8504702df0e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FormatTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FormatTestTest extends \PHPUnit_Framework_TestCase +class FormatTestTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 136ff73b0c24..9f4de6cc474b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * HasOnlyReadOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class HasOnlyReadOnlyTest extends \PHPUnit_Framework_TestCase +class HasOnlyReadOnlyTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php index 9918ec0de653..63a058209515 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObject1Test Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObject1Test extends \PHPUnit_Framework_TestCase +class InlineObject1Test extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php index 9488ef45c5c4..010a1cf8cb33 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObject2Test Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObject2Test extends \PHPUnit_Framework_TestCase +class InlineObject2Test extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php index 1ecfe3a65518..2f8e920d90c2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObject3Test Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObject3Test extends \PHPUnit_Framework_TestCase +class InlineObject3Test extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php index 3342fe277dc8..20edfd60fb2b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObject4Test Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObject4Test extends \PHPUnit_Framework_TestCase +class InlineObject4Test extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php index 2956438b5a4c..f92fbff600af 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObject5Test Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObject5Test extends \PHPUnit_Framework_TestCase +class InlineObject5Test extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php index ffe3c8b6314b..257f0e37d1b8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineObjectTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineObjectTest extends \PHPUnit_Framework_TestCase +class InlineObjectTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php index a1c82c5d4ac1..1cf846310ca7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * InlineResponseDefaultTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class InlineResponseDefaultTest extends \PHPUnit_Framework_TestCase +class InlineResponseDefaultTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index c5a4c6c18cd5..4988023b1f5b 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * MapTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MapTestTest extends \PHPUnit_Framework_TestCase +class MapTestTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 5d4e54ca89c8..8b83cb39799a 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * MixedPropertiesAndAdditionalPropertiesClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MixedPropertiesAndAdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase +class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index ad9861df8b4a..daa71cee6c54 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * Model200ResponseTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class Model200ResponseTest extends \PHPUnit_Framework_TestCase +class Model200ResponseTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 0cd35c45ce1d..3118d16fcf7d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ModelListTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ModelListTest extends \PHPUnit_Framework_TestCase +class ModelListTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 146b2e8bdb49..0716aa2d23b6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ModelReturnTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ModelReturnTest extends \PHPUnit_Framework_TestCase +class ModelReturnTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 4f3ad1179b08..4f332c873356 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * NameTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class NameTest extends \PHPUnit_Framework_TestCase +class NameTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index ff60318d69cc..1f87f39c3442 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * NumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class NumberOnlyTest extends \PHPUnit_Framework_TestCase +class NumberOnlyTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 4b32cc5aee53..6aa74104605f 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OrderTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OrderTest extends \PHPUnit_Framework_TestCase +class OrderTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 05b830c9a25c..144751ededb6 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OuterCompositeTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterCompositeTest extends \PHPUnit_Framework_TestCase +class OuterCompositeTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index a31cf971d125..95d47a7bec6e 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OuterEnumTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnumTest extends \PHPUnit_Framework_TestCase +class OuterEnumTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 1f9b174a477e..d7c54e220441 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * PetTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class PetTest extends \PHPUnit_Framework_TestCase +class PetTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 2b6961489a8d..b959b4bbbe88 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ReadOnlyFirstTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ReadOnlyFirstTest extends \PHPUnit_Framework_TestCase +class ReadOnlyFirstTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index ef8d5625fe41..4391e9768817 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * SpecialModelNameTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class SpecialModelNameTest extends \PHPUnit_Framework_TestCase +class SpecialModelNameTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php index 967f794b9716..4c2ec025ae98 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * StringBooleanMapTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class StringBooleanMapTest extends \PHPUnit_Framework_TestCase +class StringBooleanMapTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 25c11be40912..3cd76b617ea7 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * TagTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class TagTest extends \PHPUnit_Framework_TestCase +class TagTest extends TestCase { /** diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 311299c9b977..a20f346c9728 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * UserTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class UserTest extends \PHPUnit_Framework_TestCase +class UserTest extends TestCase { /** From b3495ecbfe94401b10e914a686631671684041ff Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:44:12 +0900 Subject: [PATCH 05/14] Update namespace of PHPUnit ("tests" folder) --- .../client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php | 3 ++- .../client/petstore/php/OpenAPIClient-php/tests/AuthTest.php | 3 ++- .../php/OpenAPIClient-php/tests/DateTimeSerializerTest.php | 3 ++- .../client/petstore/php/OpenAPIClient-php/tests/DebugTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/tests/EnumClassTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/EnumTestTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/ExceptionTest.php | 3 ++- .../php/OpenAPIClient-php/tests/HeaderSelectorTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/tests/HeadersTest.php | 4 +++- .../php/OpenAPIClient-php/tests/ModelInheritanceTest.php | 3 ++- .../php/OpenAPIClient-php/tests/ObjectSerializerTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/tests/OrderApiTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/tests/OuterEnumTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/ParametersTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/PetApiTest.php | 3 ++- .../client/petstore/php/OpenAPIClient-php/tests/PetTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/RequestTest.php | 3 ++- .../php/OpenAPIClient-php/tests/ResponseTypesTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/StoreApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/tests/UserApiTest.php | 3 ++- 20 files changed, 45 insertions(+), 20 deletions(-) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php index 0ac3ad36adae..2d96ce317a9d 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php @@ -4,8 +4,9 @@ use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; -class AsyncTest extends \PHPUnit_Framework_TestCase +class AsyncTest extends TestCase { /** @var PetApi */ private $api; diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php index 271c13fa39a2..daafb50ede7c 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php @@ -5,10 +5,11 @@ use OpenAPI\Client\Api\FakeApi; use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/FakeHttpClient.php'; -class AuthTest extends \PHPUnit_Framework_TestCase +class AuthTest extends TestCase { public function testCustomApiKeyHeader() { diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php index 288f491f67e6..3a889cba6dae 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php @@ -3,8 +3,9 @@ namespace OpenAPI\Client; use OpenAPI\Client\Model\FormatTest; +use PHPUnit\Framework\TestCase; -class DateTimeSerializerTest extends \PHPUnit_Framework_TestCase +class DateTimeSerializerTest extends TestCase { public function testDateTimeSanitazion() { diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php index 1f3b7c1e7b98..4cf198f66038 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php @@ -1,7 +1,9 @@ Date: Mon, 19 Nov 2018 15:50:20 +0900 Subject: [PATCH 06/14] `setExpectedException` is deleted in PHPUnit 7.4 --- .../php/OpenAPIClient-php/tests/AsyncTest.php | 10 ++++++---- .../php/OpenAPIClient-php/tests/OuterEnumTest.php | 12 ++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php index 2d96ce317a9d..6d4b8cefa4ef 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php @@ -62,10 +62,11 @@ public function testAsyncRequestWithHttpInfo() $this->assertInstanceOf(Pet::class, $pet); } + /** + * @expectedException \OpenAPI\Client\ApiException + */ public function testAsyncThrowingException() { - $this->setExpectedException(ApiException::class); - $promise = $this->api->getPetByIdAsync(0); $promise->wait(); } @@ -76,10 +77,11 @@ public function testAsyncApiExceptionWithoutWaitIsNotThrown() sleep(1); } + /** + * @expectedException \OpenAPI\Client\ApiException + */ public function testAsyncHttpInfoThrowingException() { - $this->setExpectedException(ApiException::class); - $promise = $this->api->getPetByIdAsyncWithHttpInfo(0); $promise->wait(); } diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/OuterEnumTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/OuterEnumTest.php index 728cdce06bb2..71a28e466ce9 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/OuterEnumTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/OuterEnumTest.php @@ -19,10 +19,12 @@ public function testDeserialize() $this->assertEquals('placed', $result); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid value for enum + */ public function testDeserializeInvalidValue() { - $this->setExpectedException(\InvalidArgumentException::class, 'Invalid value for enum'); - ObjectSerializer::deserialize( "lkjfalgkdfjg", OuterEnum::class @@ -79,10 +81,12 @@ public function testSanitizeNested() $this->assertEquals('approved', $result->outerEnum); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid value for enum + */ public function testSanitizeNestedInvalidValue() { - $this->setExpectedException(\InvalidArgumentException::class, 'Invalid value for enum'); - $input = new EnumTest([ 'enum_string' => 'UPPER', 'enum_integer' => -1, From 2fc6917d13ff44769b9535b34e27b3a3d511d489 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:54:22 +0900 Subject: [PATCH 07/14] Update namespace of "Assert" class --- .../client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php index cb81e1cf276c..41c471e951b8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php @@ -6,6 +6,7 @@ use OpenAPI\Client\Model\ApiResponse; use OpenAPI\Client\Model\Pet; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\Assert; class PetApiTest extends TestCase { @@ -46,7 +47,7 @@ public static function setUpBeforeClass() // add a new pet (model) list(, $status) = $petApi->addPetWithHttpInfo($newPet); - \PHPUnit_Framework_Assert::assertEquals(200, $status); + Assert::assertEquals(200, $status); } public function setUp() From 0b5301622c86cb8c5cfbefb3cc2aa8f5f4615fe5 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:57:17 +0900 Subject: [PATCH 08/14] The attribute 'name' is required --- .../src/main/resources/php/phpunit.xml.mustache | 2 +- .../client/petstore/php/OpenAPIClient-php/phpunit.xml.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache b/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache index 5de6fea575c0..089480f6b1e6 100644 --- a/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache +++ b/modules/openapi-generator/src/main/resources/php/phpunit.xml.mustache @@ -6,7 +6,7 @@ convertWarningsToExceptions="true" stopOnFailure="false"> - + {{apiTestPath}} {{modelTestPath}} diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist b/samples/openapi3/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist index c12ee1484773..08f78faf3bb3 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist @@ -6,7 +6,7 @@ convertWarningsToExceptions="true" stopOnFailure="false"> - + ./test/Api ./test/Model From 0d016c00ed511aa2dd81dd4f575931274a47ad39 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 15:59:43 +0900 Subject: [PATCH 09/14] Add anotation to exclude the test from risky testcheck --- .../client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php index 6d4b8cefa4ef..a1af7b1238b8 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php @@ -71,6 +71,9 @@ public function testAsyncThrowingException() $promise->wait(); } + /** + * @doesNotPerformAssertions + */ public function testAsyncApiExceptionWithoutWaitIsNotThrown() { $promise = $this->api->getPetByIdAsync(0); From f1e532880dec4de733dcb65570aa8dbbbb2f558d Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 16:29:31 +0900 Subject: [PATCH 10/14] Update samples (samples/client/petstore/php) --- samples/client/petstore/php/OpenAPIClient-php/composer.json | 4 ++-- .../client/petstore/php/OpenAPIClient-php/phpunit.xml.dist | 2 +- .../php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php | 3 ++- .../test/Api/FakeClassnameTags123ApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php | 3 ++- .../petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php | 3 ++- .../test/Model/AdditionalPropertiesClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/AnimalFarmTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ApiResponseTest.php | 4 +++- .../test/Model/ArrayOfArrayOfNumberOnlyTest.php | 4 +++- .../OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ArrayTestTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/CapitalizationTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/CatTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/CategoryTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ClassModelTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/ClientTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/DogTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumArraysTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/EnumTestTest.php | 4 +++- .../OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/FileTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/FormatTestTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php | 4 +++- .../Model/MixedPropertiesAndAdditionalPropertiesClassTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/Model200ResponseTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ModelListTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ModelReturnTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/NameTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/NumberOnlyTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/OrderTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/OuterCompositeTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/OuterEnumTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/PetTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php | 4 +++- .../php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/TagTest.php | 4 +++- .../petstore/php/OpenAPIClient-php/test/Model/UserTest.php | 4 +++- 44 files changed, 123 insertions(+), 45 deletions(-) diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json index 45b3c6972619..e413b1364a1f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^7.4", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.12" }, diff --git a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist index c12ee1484773..08f78faf3bb3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore/php/OpenAPIClient-php/phpunit.xml.dist @@ -6,7 +6,7 @@ convertWarningsToExceptions="true" stopOnFailure="false"> - + ./test/Api ./test/Model diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index 8caf0e3e19f1..8c4febe6bf2a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * AnotherFakeApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnotherFakeApiTest extends \PHPUnit_Framework_TestCase +class AnotherFakeApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index eabfd782201f..bd8bb23f6bb4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * FakeApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FakeApiTest extends \PHPUnit_Framework_TestCase +class FakeApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index f417940ad6d3..c204813b86e0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * FakeClassnameTags123ApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FakeClassnameTags123ApiTest extends \PHPUnit_Framework_TestCase +class FakeClassnameTags123ApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index 4d6a983f0cf6..c736f7cf0c7b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * PetApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class PetApiTest extends \PHPUnit_Framework_TestCase +class PetApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 421a35f0aaf3..605c2c146060 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * StoreApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class StoreApiTest extends \PHPUnit_Framework_TestCase +class StoreApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index 7bc35cb3a05b..e3421d700d66 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -31,6 +31,7 @@ use \OpenAPI\Client\Configuration; use \OpenAPI\Client\ApiException; use \OpenAPI\Client\ObjectSerializer; +use PHPUnit\Framework\TestCase; /** * UserApiTest Class Doc Comment @@ -40,7 +41,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class UserApiTest extends \PHPUnit_Framework_TestCase +class UserApiTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php index 8f0bf5fba6be..8a265e6111f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AdditionalPropertiesClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase +class AdditionalPropertiesClassTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php index 2632576cb70c..776d096ebc81 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalFarmTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AnimalFarmTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnimalFarmTest extends \PHPUnit_Framework_TestCase +class AnimalFarmTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php index 4c8eee3facb2..308f5764fd91 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AnimalTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * AnimalTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class AnimalTest extends \PHPUnit_Framework_TestCase +class AnimalTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index a2ae65b04846..4f2761a6fec3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ApiResponseTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ApiResponseTest extends \PHPUnit_Framework_TestCase +class ApiResponseTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index be40731bc175..b302a5c9f8e4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayOfArrayOfNumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayOfArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase +class ArrayOfArrayOfNumberOnlyTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 48c90fc4daeb..d62f69a8c405 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayOfNumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayOfNumberOnlyTest extends \PHPUnit_Framework_TestCase +class ArrayOfNumberOnlyTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index 58fd6dd10738..d0d4908c40ed 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ArrayTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ArrayTestTest extends \PHPUnit_Framework_TestCase +class ArrayTestTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php index f2e9cbe17333..a7509d59015d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CapitalizationTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CapitalizationTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CapitalizationTest extends \PHPUnit_Framework_TestCase +class CapitalizationTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index 768be0105585..9ec71a648897 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CatTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CatTest extends \PHPUnit_Framework_TestCase +class CatTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 800af18fa538..e6ce1dc396b8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * CategoryTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class CategoryTest extends \PHPUnit_Framework_TestCase +class CategoryTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 387e35ca7508..d3a6a966df3d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ClassModelTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ClassModelTest extends \PHPUnit_Framework_TestCase +class ClassModelTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index b2a0fcbadcf3..fa9e2a99caa0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ClientTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ClientTest extends \PHPUnit_Framework_TestCase +class ClientTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 5c40d07c089c..f2b1cf3cc088 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * DogTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class DogTest extends \PHPUnit_Framework_TestCase +class DogTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index 476961f26f45..a78404d96823 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumArraysTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumArraysTest extends \PHPUnit_Framework_TestCase +class EnumArraysTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index 887f6ecf00a1..b122efb317a0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumClassTest extends \PHPUnit_Framework_TestCase +class EnumClassTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index ae762409e44a..333627d07abb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * EnumTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumTestTest extends \PHPUnit_Framework_TestCase +class EnumTestTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index 223c6c2614f8..12225a23e4ca 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FileSchemaTestClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FileSchemaTestClassTest extends \PHPUnit_Framework_TestCase +class FileSchemaTestClassTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index 843c99320da2..73e1a3ea0af4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FileTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FileTest extends \PHPUnit_Framework_TestCase +class FileTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index efe91f079fe6..bd82d3490c03 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * FormatTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class FormatTestTest extends \PHPUnit_Framework_TestCase +class FormatTestTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 136ff73b0c24..9f4de6cc474b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * HasOnlyReadOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class HasOnlyReadOnlyTest extends \PHPUnit_Framework_TestCase +class HasOnlyReadOnlyTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php index c5a4c6c18cd5..4988023b1f5b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MapTestTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * MapTestTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MapTestTest extends \PHPUnit_Framework_TestCase +class MapTestTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 5d4e54ca89c8..8b83cb39799a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * MixedPropertiesAndAdditionalPropertiesClassTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MixedPropertiesAndAdditionalPropertiesClassTest extends \PHPUnit_Framework_TestCase +class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index ad9861df8b4a..daa71cee6c54 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * Model200ResponseTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class Model200ResponseTest extends \PHPUnit_Framework_TestCase +class Model200ResponseTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 0cd35c45ce1d..3118d16fcf7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ModelListTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ModelListTest extends \PHPUnit_Framework_TestCase +class ModelListTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index 146b2e8bdb49..0716aa2d23b6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ModelReturnTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ModelReturnTest extends \PHPUnit_Framework_TestCase +class ModelReturnTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 4f3ad1179b08..4f332c873356 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * NameTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class NameTest extends \PHPUnit_Framework_TestCase +class NameTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index ff60318d69cc..1f87f39c3442 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * NumberOnlyTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class NumberOnlyTest extends \PHPUnit_Framework_TestCase +class NumberOnlyTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 4b32cc5aee53..6aa74104605f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OrderTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OrderTest extends \PHPUnit_Framework_TestCase +class OrderTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 05b830c9a25c..144751ededb6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OuterCompositeTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterCompositeTest extends \PHPUnit_Framework_TestCase +class OuterCompositeTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index a31cf971d125..95d47a7bec6e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * OuterEnumTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnumTest extends \PHPUnit_Framework_TestCase +class OuterEnumTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index 1f9b174a477e..d7c54e220441 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * PetTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class PetTest extends \PHPUnit_Framework_TestCase +class PetTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 2b6961489a8d..b959b4bbbe88 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * ReadOnlyFirstTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class ReadOnlyFirstTest extends \PHPUnit_Framework_TestCase +class ReadOnlyFirstTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index ef8d5625fe41..4391e9768817 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * SpecialModelNameTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class SpecialModelNameTest extends \PHPUnit_Framework_TestCase +class SpecialModelNameTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php index 967f794b9716..4c2ec025ae98 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/StringBooleanMapTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * StringBooleanMapTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class StringBooleanMapTest extends \PHPUnit_Framework_TestCase +class StringBooleanMapTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index 25c11be40912..3cd76b617ea7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * TagTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class TagTest extends \PHPUnit_Framework_TestCase +class TagTest extends TestCase { /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php index 311299c9b977..a20f346c9728 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/UserTest.php @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use PHPUnit\Framework\TestCase; + /** * UserTest Class Doc Comment * @@ -38,7 +40,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class UserTest extends \PHPUnit_Framework_TestCase +class UserTest extends TestCase { /** From 20306de8d901f9fcf4e4a5b656e40a17479201cf Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 16:37:53 +0900 Subject: [PATCH 11/14] Apply updates to "test" in openapi2 folder (samples/client/petstore/php) https://github.com/OpenAPITools/openapi-generator/pull/1491/commits/b3495ecbfe94401b10e914a686631671684041ff https://github.com/OpenAPITools/openapi-generator/pull/1491/commits/15e00ae89d4e4ca4f21f421225cb691552bfef46 https://github.com/OpenAPITools/openapi-generator/pull/1491/commits/2fc6917d13ff44769b9535b34e27b3a3d511d489 https://github.com/OpenAPITools/openapi-generator/pull/1491/commits/0d016c00ed511aa2dd81dd4f575931274a47ad39 --- .../php/OpenAPIClient-php/tests/AsyncTest.php | 16 +++++++++++----- .../php/OpenAPIClient-php/tests/AuthTest.php | 3 ++- .../tests/DateTimeSerializerTest.php | 3 ++- .../php/OpenAPIClient-php/tests/DebugTest.php | 4 +++- .../OpenAPIClient-php/tests/EnumClassTest.php | 3 ++- .../php/OpenAPIClient-php/tests/EnumTestTest.php | 3 ++- .../OpenAPIClient-php/tests/ExceptionTest.php | 3 ++- .../OpenAPIClient-php/tests/FormatTestTest.php | 3 ++- .../tests/HeaderSelectorTest.php | 4 +++- .../php/OpenAPIClient-php/tests/HeadersTest.php | 4 +++- .../tests/ModelInheritanceTest.php | 3 ++- .../tests/ObjectSerializerTest.php | 4 +++- .../php/OpenAPIClient-php/tests/OrderApiTest.php | 4 +++- .../OpenAPIClient-php/tests/OuterEnumTest.php | 15 ++++++++++----- .../OpenAPIClient-php/tests/ParametersTest.php | 3 ++- .../php/OpenAPIClient-php/tests/PetApiTest.php | 6 ++++-- .../php/OpenAPIClient-php/tests/PetTest.php | 3 ++- .../php/OpenAPIClient-php/tests/RequestTest.php | 3 ++- .../tests/ResponseTypesTest.php | 3 ++- .../php/OpenAPIClient-php/tests/StoreApiTest.php | 3 ++- .../php/OpenAPIClient-php/tests/UserApiTest.php | 3 ++- 21 files changed, 66 insertions(+), 30 deletions(-) diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php index 0ac3ad36adae..a1af7b1238b8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/AsyncTest.php @@ -4,8 +4,9 @@ use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; -class AsyncTest extends \PHPUnit_Framework_TestCase +class AsyncTest extends TestCase { /** @var PetApi */ private $api; @@ -61,24 +62,29 @@ public function testAsyncRequestWithHttpInfo() $this->assertInstanceOf(Pet::class, $pet); } + /** + * @expectedException \OpenAPI\Client\ApiException + */ public function testAsyncThrowingException() { - $this->setExpectedException(ApiException::class); - $promise = $this->api->getPetByIdAsync(0); $promise->wait(); } + /** + * @doesNotPerformAssertions + */ public function testAsyncApiExceptionWithoutWaitIsNotThrown() { $promise = $this->api->getPetByIdAsync(0); sleep(1); } + /** + * @expectedException \OpenAPI\Client\ApiException + */ public function testAsyncHttpInfoThrowingException() { - $this->setExpectedException(ApiException::class); - $promise = $this->api->getPetByIdAsyncWithHttpInfo(0); $promise->wait(); } diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php index 271c13fa39a2..daafb50ede7c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/AuthTest.php @@ -5,10 +5,11 @@ use OpenAPI\Client\Api\FakeApi; use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/FakeHttpClient.php'; -class AuthTest extends \PHPUnit_Framework_TestCase +class AuthTest extends TestCase { public function testCustomApiKeyHeader() { diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php index 288f491f67e6..3a889cba6dae 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php @@ -3,8 +3,9 @@ namespace OpenAPI\Client; use OpenAPI\Client\Model\FormatTest; +use PHPUnit\Framework\TestCase; -class DateTimeSerializerTest extends \PHPUnit_Framework_TestCase +class DateTimeSerializerTest extends TestCase { public function testDateTimeSanitazion() { diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php index 86812d0f35ad..375b054b4791 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php @@ -1,7 +1,9 @@ assertEquals('placed', $result); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid value for enum + */ public function testDeserializeInvalidValue() { - $this->setExpectedException(\InvalidArgumentException::class, 'Invalid value for enum'); - ObjectSerializer::deserialize( "lkjfalgkdfjg", OuterEnum::class @@ -78,10 +81,12 @@ public function testSanitizeNested() $this->assertEquals('approved', $result->outerEnum); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Invalid value for enum + */ public function testSanitizeNestedInvalidValue() { - $this->setExpectedException(\InvalidArgumentException::class, 'Invalid value for enum'); - $input = new EnumTest([ 'enum_string' => 'UPPER', 'enum_integer' => -1, diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php index 25ba7d90d567..c70a5c60e471 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ParametersTest.php @@ -4,10 +4,11 @@ use OpenAPI\Client\Api\FakeApi; use OpenAPI\Client\Api\UserApi; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/FakeHttpClient.php'; -class ParametersTest extends \PHPUnit_Framework_TestCase +class ParametersTest extends TestCase { /** @var FakeHttpClient */ private $fakeHttpClient; diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php index 97469118070f..6f4781a7c371 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/PetApiTest.php @@ -5,8 +5,10 @@ use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\ApiResponse; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\Assert; +use PHPUnit\Framework\TestCase; -class PetApiTest extends \PHPUnit_Framework_TestCase +class PetApiTest extends TestCase { /** @var PetApi */ @@ -45,7 +47,7 @@ public static function setUpBeforeClass() // add a new pet (model) list(, $status) = $petApi->addPetWithHttpInfo($newPet); - \PHPUnit_Framework_Assert::assertEquals(200, $status); + Assert::assertEquals(200, $status); } public function setUp() diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/PetTest.php index 5e4a3f2a1955..c3c4ee8950e3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/PetTest.php @@ -3,8 +3,9 @@ namespace OpenAPI\Client; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; -class PetTest extends \PHPUnit_Framework_TestCase +class PetTest extends TestCase { /** * test empty object serialization diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/RequestTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/RequestTest.php index 442a61c4c0b6..3bec91563618 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/RequestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/RequestTest.php @@ -3,10 +3,11 @@ namespace OpenAPI\Client; use OpenAPI\Client\Api\FakeApi; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/FakeHttpClient.php'; -class RequestTest extends \PHPUnit_Framework_TestCase +class RequestTest extends TestCase { /** @var FakeApi */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/ResponseTypesTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/ResponseTypesTest.php index 5735221fb792..499007fa03e0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/ResponseTypesTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/ResponseTypesTest.php @@ -5,10 +5,11 @@ use GuzzleHttp\Psr7\Response; use OpenAPI\Client\Api\PetApi; use OpenAPI\Client\Model\Pet; +use PHPUnit\Framework\TestCase; require_once __DIR__ . '/FakeHttpClient.php'; -class ResponseTypesTest extends \PHPUnit_Framework_TestCase +class ResponseTypesTest extends TestCase { /** @var PetApi */ private $api; diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/StoreApiTest.php index 610281d4db4b..f18f3ce66cae 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/StoreApiTest.php @@ -7,8 +7,9 @@ use OpenAPI\Client\Model\Category; use OpenAPI\Client\Model\Pet; use OpenAPI\Client\Model\Tag; +use PHPUnit\Framework\TestCase; -class StoreApiTest extends \PHPUnit_Framework_TestCase +class StoreApiTest extends TestCase { /** @var StoreApi */ private $api; diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/UserApiTest.php index c9d5753db95a..41d4f2b3e6d0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/UserApiTest.php @@ -3,8 +3,9 @@ namespace OpenAPI\Client; use OpenAPI\Client\Api\UserApi; +use PHPUnit\Framework\TestCase; -class UserApiTest extends \PHPUnit_Framework_TestCase +class UserApiTest extends TestCase { /** @var UserApi*/ From 9a1425db12887e2e93b129ce90aabc5fa8619390 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Mon, 19 Nov 2018 16:59:12 +0900 Subject: [PATCH 12/14] Install php7.1 --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7c52b26d12ea..0482137233f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,6 +80,13 @@ before_install: - sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' - sudo apt-get update - sudo apt-get install dart + # install php + - sudo add-apt-repository -y ppa:ondrej/php + - sudo apt-get update -qq + - sudo apt-get purge php5.6 + - sudo apt-get --purge autoremove + - sudo apt-get install PHP7.1 + - php -v # install perl module #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) #- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role From c0b643a82a72374832b0992f73a8c114a0c56b5d Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Sat, 24 Nov 2018 11:08:58 +0700 Subject: [PATCH 13/14] Switch to php7 --- .travis.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0482137233f5..2e10d9b3c4d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,12 +80,8 @@ before_install: - sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' - sudo apt-get update - sudo apt-get install dart - # install php - - sudo add-apt-repository -y ppa:ondrej/php - - sudo apt-get update -qq - - sudo apt-get purge php5.6 - - sudo apt-get --purge autoremove - - sudo apt-get install PHP7.1 + # switch to php7 + - phpenv global 7.1 - php -v # install perl module #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) From 9b5c17df6131c3e579ba075cb3f5d58b0227bf2c Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Sat, 24 Nov 2018 13:10:49 +0700 Subject: [PATCH 14/14] Update samples (security) bin/security/php-petstore.sh --- .../.openapi-generator/VERSION | 2 +- .../php/OpenAPIClient-php/composer.json | 4 +-- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 10 +++--- .../OpenAPIClient-php/lib/ApiException.php | 2 +- .../OpenAPIClient-php/lib/Configuration.php | 2 +- .../OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../lib/Model/ModelInterface.php | 2 +- .../lib/Model/ModelReturn.php | 2 +- .../lib/ObjectSerializer.php | 34 ++++++++++++------- .../php/OpenAPIClient-php/phpunit.xml.dist | 2 +- 10 files changed, 35 insertions(+), 27 deletions(-) diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION index 6d94c9c2e12a..d077ffb477a4 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.0-SNAPSHOT \ No newline at end of file +3.3.4-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json b/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json index 45b3c6972619..e413b1364a1f 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^7.4", "squizlabs/php_codesniffer": "~2.6", "friendsofphp/php-cs-fixer": "~2.12" }, diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php index b8df0f363deb..d210ab40797d 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** @@ -253,10 +253,10 @@ protected function testCodeInjectEndRnNRRequest($unknown_base_type = null) // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; } } elseif (count($formParams) > 0) { if ($multipart) { diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php index 516981727ba1..85d35f836307 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ApiException.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php index 38464086bf4e..efcacba885d0 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Configuration.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php index 0a183e1a9ceb..a08d9d4a0e5e 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -17,7 +17,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php index 2970c2b72c03..4b4c74497065 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 97a18252d864..ada5d2e21549 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php index f2142a2e86e5..c7da9e2f345b 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -18,7 +18,7 @@ * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 3.3.0-SNAPSHOT + * OpenAPI Generator version: 3.3.4-SNAPSHOT */ /** @@ -29,6 +29,8 @@ namespace OpenAPI\Client; +use OpenAPI\Client\Model\ModelInterface; + /** * ObjectSerializer Class Doc Comment * @@ -61,19 +63,25 @@ public static function sanitizeForSerialization($data, $type = null, $format = n return $data; } elseif (is_object($data)) { $values = []; - $formats = $data::openAPIFormats(); - foreach ($data::openAPITypes() as $property => $openAPIType) { - $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null - && !in_array($openAPIType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) - && method_exists($openAPIType, 'getAllowableEnumValues') - && !in_array($value, $openAPIType::getAllowableEnumValues(), true)) { - $imploded = implode("', '", $openAPIType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null + && !in_array($openAPIType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) + && method_exists($openAPIType, 'getAllowableEnumValues') + && !in_array($value, $openAPIType::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $openAPIType::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + if ($value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } } - if ($value !== null) { - $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); } } return (object)$values; diff --git a/samples/client/petstore-security-test/php/OpenAPIClient-php/phpunit.xml.dist b/samples/client/petstore-security-test/php/OpenAPIClient-php/phpunit.xml.dist index c12ee1484773..08f78faf3bb3 100644 --- a/samples/client/petstore-security-test/php/OpenAPIClient-php/phpunit.xml.dist +++ b/samples/client/petstore-security-test/php/OpenAPIClient-php/phpunit.xml.dist @@ -6,7 +6,7 @@ convertWarningsToExceptions="true" stopOnFailure="false"> - + ./test/Api ./test/Model