mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 23:52:45 +00:00
Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables (#3266)
* Set error_reporting(E_ALL) in phpunit.xml settings, so that undefined variables will always cause a test failure * Update petstore sample for php-laravel
This commit is contained in:
committed by
William Cheng
parent
fa10103363
commit
78551d0180
@@ -23,6 +23,7 @@
|
|||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
|||||||
@@ -24,4 +24,7 @@
|
|||||||
<directory suffix=".php">{{modelSrcPath}}</directory>
|
<directory suffix=".php">{{modelSrcPath}}</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
</phpunit>
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
|
|||||||
@@ -11,15 +11,14 @@
|
|||||||
<directory>{{modelTestPath}}</directory>
|
<directory>{{modelTestPath}}</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<php>
|
|
||||||
<server name="KERNEL_DIR" value="Tests/" />
|
|
||||||
</php>
|
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">{{apiSrcPath}}</directory>
|
<directory suffix=".php">{{apiSrcPath}}</directory>
|
||||||
<directory suffix=".php">{{modelSrcPath}}</directory>
|
<directory suffix=".php">{{modelSrcPath}}</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
<server name="KERNEL_DIR" value="Tests/" />
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -11,11 +11,13 @@
|
|||||||
<directory>{{modelTestPath}}</directory>
|
<directory>{{modelTestPath}}</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">{{apiSrcPath}}</directory>
|
<directory suffix=".php">{{apiSrcPath}}</directory>
|
||||||
<directory suffix=".php">{{modelSrcPath}}</directory>
|
<directory suffix=".php">{{modelSrcPath}}</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -11,11 +11,13 @@
|
|||||||
<directory>./test/Model</directory>
|
<directory>./test/Model</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">./lib/Api</directory>
|
<directory suffix=".php">./lib/Api</directory>
|
||||||
<directory suffix=".php">./lib/Model</directory>
|
<directory suffix=".php">./lib/Model</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -11,11 +11,13 @@
|
|||||||
<directory>./test/Model</directory>
|
<directory>./test/Model</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">./lib/Api</directory>
|
<directory suffix=".php">./lib/Api</directory>
|
||||||
<directory suffix=".php">./lib/Model</directory>
|
<directory suffix=".php">./lib/Model</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
4.0.0-SNAPSHOT
|
4.0.3-SNAPSHOT
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesAnyType
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesAnyType
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesAnyType {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesArray
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesArray
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesArray {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesBoolean
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesBoolean
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesBoolean {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,10 +9,37 @@ namespace app\Models;
|
|||||||
*/
|
*/
|
||||||
class AdditionalPropertiesClass {
|
class AdditionalPropertiesClass {
|
||||||
|
|
||||||
/** @var map[string,string] $mapProperty */
|
/** @var map[string,string] $mapString */
|
||||||
private $mapProperty;
|
private $mapString;
|
||||||
|
|
||||||
/** @var map[string,map[string,string]] $mapOfMapProperty */
|
/** @var map[string,float] $mapNumber */
|
||||||
private $mapOfMapProperty;
|
private $mapNumber;
|
||||||
|
|
||||||
|
/** @var map[string,int] $mapInteger */
|
||||||
|
private $mapInteger;
|
||||||
|
|
||||||
|
/** @var map[string,bool] $mapBoolean */
|
||||||
|
private $mapBoolean;
|
||||||
|
|
||||||
|
/** @var map[string,int[]] $mapArrayInteger */
|
||||||
|
private $mapArrayInteger;
|
||||||
|
|
||||||
|
/** @var map[string,object[]] $mapArrayAnytype */
|
||||||
|
private $mapArrayAnytype;
|
||||||
|
|
||||||
|
/** @var map[string,map[string,string]] $mapMapString */
|
||||||
|
private $mapMapString;
|
||||||
|
|
||||||
|
/** @var map[string,map[string,object]] $mapMapAnytype */
|
||||||
|
private $mapMapAnytype;
|
||||||
|
|
||||||
|
/** @var object $anytype1 */
|
||||||
|
private $anytype1;
|
||||||
|
|
||||||
|
/** @var object $anytype2 */
|
||||||
|
private $anytype2;
|
||||||
|
|
||||||
|
/** @var object $anytype3 */
|
||||||
|
private $anytype3;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesInteger
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesInteger
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesInteger {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesNumber
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesNumber
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesNumber {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesObject
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesObject
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesObject {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesString
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesString
|
||||||
|
*/
|
||||||
|
class AdditionalPropertiesString {
|
||||||
|
|
||||||
|
/** @var string $name */
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* CatAllOf
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CatAllOf
|
||||||
|
*/
|
||||||
|
class CatAllOf {
|
||||||
|
|
||||||
|
/** @var bool $declawed */
|
||||||
|
private $declawed;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* DogAllOf
|
||||||
|
*/
|
||||||
|
namespace app\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DogAllOf
|
||||||
|
*/
|
||||||
|
class DogAllOf {
|
||||||
|
|
||||||
|
/** @var string $breed */
|
||||||
|
private $breed;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
|||||||
@@ -24,4 +24,7 @@
|
|||||||
<directory suffix=".php">./lib/Model</directory>
|
<directory suffix=".php">./lib/Model</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
</phpunit>
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
|
|||||||
@@ -11,15 +11,14 @@
|
|||||||
<directory>./Tests/Model</directory>
|
<directory>./Tests/Model</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<php>
|
|
||||||
<server name="KERNEL_DIR" value="Tests/" />
|
|
||||||
</php>
|
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">././Api</directory>
|
<directory suffix=".php">././Api</directory>
|
||||||
<directory suffix=".php">././Model</directory>
|
<directory suffix=".php">././Model</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
|
<server name="KERNEL_DIR" value="Tests/" />
|
||||||
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
Reference in New Issue
Block a user