PHPUnit upgrade to 9.1, PHP upgrade to 7.3

This commit is contained in:
Igor Scheller 2020-04-19 23:14:06 +02:00 committed by msquare
parent 795a0631cb
commit 351fc1f749
8 changed files with 12 additions and 15 deletions

View File

@ -16,7 +16,7 @@ Please read the [CONTRIBUTING.md](CONTRIBUTING.md) and [DEVELOPMENT.md](DEVELOPM
The Engelsystem may be installed manually or by using the provided [docker setup](#docker). The Engelsystem may be installed manually or by using the provided [docker setup](#docker).
### Requirements ### Requirements
* PHP >= 7.2 * PHP >= 7.3
* Required modules: * Required modules:
* dom * dom
* json * json

View File

@ -18,7 +18,7 @@
"phpcbf": "phpcbf -p" "phpcbf": "phpcbf -p"
}, },
"require": { "require": {
"php": ">=7.2.0", "php": ">=7.3.0",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
@ -45,9 +45,9 @@
"vlucas/phpdotenv": "^3.3" "vlucas/phpdotenv": "^3.3"
}, },
"require-dev": { "require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.1.0", "dms/phpunit-arraysubset-asserts": "^0.2.0",
"filp/whoops": "^2.3", "filp/whoops": "^2.3",
"phpunit/phpunit": "^8.1", "phpunit/phpunit": "^9.1",
"squizlabs/php_codesniffer": "^3.5", "squizlabs/php_codesniffer": "^3.5",
"symfony/var-dumper": "^4.3" "symfony/var-dumper": "^4.3"
}, },

View File

@ -1,6 +1,6 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="./tests/autoload.php" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.3/phpunit.xsd" bootstrap="./includes/autoload.php"
colors="true" colors="true"
> >
<testsuites> <testsuites>

View File

@ -37,7 +37,7 @@ class EngelsystemMailerTest extends TestCase
$this->setExpects($view, 'render', ['test/template.tpl', ['dev' => true]], 'Rendered Stuff!'); $this->setExpects($view, 'render', ['test/template.tpl', ['dev' => true]], 'Rendered Stuff!');
$return = $mailer->sendView('foo@bar.baz', 'Lorem dolor', 'test/template.tpl', ['dev' => true]); $return = $mailer->sendView('foo@bar.baz', 'Lorem dolor', 'test/template.tpl', ['dev' => true]);
$this->equalTo(1, $return); $this->assertEquals(1, $return);
} }
/** /**
@ -91,7 +91,7 @@ class EngelsystemMailerTest extends TestCase
['dev' => true], ['dev' => true],
'de_DE' 'de_DE'
); );
$this->equalTo(1, $return); $this->assertEquals(1, $return);
} }
/** /**
@ -120,6 +120,6 @@ class EngelsystemMailerTest extends TestCase
$this->assertEquals('Mail test', $mailer->getSubjectPrefix()); $this->assertEquals('Mail test', $mailer->getSubjectPrefix());
$return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!'); $return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!');
$this->equalTo(1, $return); $this->assertEquals(1, $return);
} }
} }

View File

@ -72,6 +72,6 @@ class MailerTest extends TestCase
$mailer->setFromName('Lorem Ipsum'); $mailer->setFromName('Lorem Ipsum');
$return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!'); $return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!');
$this->equalTo(1, $return); $this->assertEquals(1, $return);
} }
} }

View File

@ -52,6 +52,6 @@ class LogTransportTest extends TestCase
->willReturn(['foo@bar.batz' => null, 'lor@em.ips' => 'Lorem Ipsum']); ->willReturn(['foo@bar.batz' => null, 'lor@em.ips' => 'Lorem Ipsum']);
$return = $transport->send($message); $return = $transport->send($message);
$this->equalTo(2, $return); $this->assertEquals(2, $return);
} }
} }

View File

@ -65,7 +65,7 @@ class HtmlEngineTest extends TestCase
protected function tearDown(): void protected function tearDown(): void
{ {
foreach ($this->tmpFileNames as $fileName) { foreach ($this->tmpFileNames as $fileName) {
unlink($fileName); file_exists($fileName) && unlink($fileName);
} }
} }
} }

View File

@ -1,3 +0,0 @@
<?php
require_once __DIR__ . '/../includes/autoload.php';