Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ composer install
./vendor/bin/phpunit
```

**Note:** Running tests requires PHP 7.2 or later, while the runtime library supports PHP 5.5 and later.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:
Expand Down
10 changes: 5 additions & 5 deletions modules/swagger-codegen/src/main/resources/php/api_test.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ use \{{invokerPackage}}\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
{{#operations}}class {{classname}}Test extends \PHPUnit_Framework_TestCase
{{#operations}}class {{classname}}Test extends \PHPUnit\Framework\TestCase
{

/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}

/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}

/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}

/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}
{{#operation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"phpunit/phpunit": "^8.5.52",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~2.12"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ namespace {{invokerPackage}};
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class {{classname}}Test extends \PHPUnit_Framework_TestCase
class {{classname}}Test extends \PHPUnit\Framework\TestCase
{

/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}

/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}

/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}

/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

Expand Down
Loading