forked from loafle/openapi-generator-original
[php] Set required PHP version to 7.2 (#6603)
* Set PHP 7.2 as minimum version * Update PHPUnit to 8 || 9 * Set Bionic environment in Travis config * PHPUnit 8 requires void return in static methods * PHPUnit 8 requires void return in static methods * Fix curl exception message test When I run "curl http://wrong_host.zxc" output is: curl: (6) Could not resolve host: wrong_host.zxc Maybe this message is different across versions. Tested curl version: curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1 * Update assertions of deprecated assertInternalType * Migrate to expectException method of PHPUnit 8 * Fix PHPCS Fixer errors * Replace deprecated 'assertRegExp' assertion * Exclude PHPUnit and php-cs-fixer cache * Refresh samples * Set root Travis CI environment to PHP 7.2.5 * Change to 7.3 as 7.2.27 is highest preinstalled * Fix testWrongHost test
This commit is contained in:
@@ -8,7 +8,7 @@ class OrderApiTest extends TestCase
|
||||
{
|
||||
|
||||
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
||||
public static function setUpBeforeClass()
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
// for error reporting (need to run with php5.3 to get no warning)
|
||||
//ini_set('display_errors', 1);
|
||||
@@ -31,13 +31,11 @@ class OrderApiTest extends TestCase
|
||||
$order->setStatus("placed");
|
||||
$this->assertSame("placed", $order->getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
|
||||
public function testOrderException()
|
||||
{
|
||||
// initialize the API client
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$order = new Model\Order();
|
||||
$order->setStatus("invalid_value");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user