From 351fc1f74928f1d27dccc7ac7b681db7507cb128 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 19 Apr 2020 23:14:06 +0200 Subject: [PATCH] PHPUnit upgrade to 9.1, PHP upgrade to 7.3 --- README.md | 2 +- composer.json | 6 +++--- phpunit.xml | 4 ++-- tests/Unit/Mail/EngelsystemMailerTest.php | 6 +++--- tests/Unit/Mail/MailerTest.php | 2 +- tests/Unit/Mail/Transport/LogTransportTest.php | 2 +- tests/Unit/Renderer/HtmlEngineTest.php | 2 +- tests/autoload.php | 3 --- 8 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 tests/autoload.php diff --git a/README.md b/README.md index 0cac7ebf..2906917c 100644 --- a/README.md +++ b/README.md @@ -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). ### Requirements - * PHP >= 7.2 + * PHP >= 7.3 * Required modules: * dom * json diff --git a/composer.json b/composer.json index 2921fe7d..94294231 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "phpcbf": "phpcbf -p" }, "require": { - "php": ">=7.2.0", + "php": ">=7.3.0", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", @@ -45,9 +45,9 @@ "vlucas/phpdotenv": "^3.3" }, "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.1.0", + "dms/phpunit-arraysubset-asserts": "^0.2.0", "filp/whoops": "^2.3", - "phpunit/phpunit": "^8.1", + "phpunit/phpunit": "^9.1", "squizlabs/php_codesniffer": "^3.5", "symfony/var-dumper": "^4.3" }, diff --git a/phpunit.xml b/phpunit.xml index 98e64795..a5ae4cec 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,6 @@ diff --git a/tests/Unit/Mail/EngelsystemMailerTest.php b/tests/Unit/Mail/EngelsystemMailerTest.php index cdbdf435..b35fb0b2 100644 --- a/tests/Unit/Mail/EngelsystemMailerTest.php +++ b/tests/Unit/Mail/EngelsystemMailerTest.php @@ -37,7 +37,7 @@ class EngelsystemMailerTest extends TestCase $this->setExpects($view, 'render', ['test/template.tpl', ['dev' => true]], 'Rendered Stuff!'); $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], 'de_DE' ); - $this->equalTo(1, $return); + $this->assertEquals(1, $return); } /** @@ -120,6 +120,6 @@ class EngelsystemMailerTest extends TestCase $this->assertEquals('Mail test', $mailer->getSubjectPrefix()); $return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!'); - $this->equalTo(1, $return); + $this->assertEquals(1, $return); } } diff --git a/tests/Unit/Mail/MailerTest.php b/tests/Unit/Mail/MailerTest.php index bfecdd07..a0edc11a 100644 --- a/tests/Unit/Mail/MailerTest.php +++ b/tests/Unit/Mail/MailerTest.php @@ -72,6 +72,6 @@ class MailerTest extends TestCase $mailer->setFromName('Lorem Ipsum'); $return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!'); - $this->equalTo(1, $return); + $this->assertEquals(1, $return); } } diff --git a/tests/Unit/Mail/Transport/LogTransportTest.php b/tests/Unit/Mail/Transport/LogTransportTest.php index 6e67f648..a6d64931 100644 --- a/tests/Unit/Mail/Transport/LogTransportTest.php +++ b/tests/Unit/Mail/Transport/LogTransportTest.php @@ -52,6 +52,6 @@ class LogTransportTest extends TestCase ->willReturn(['foo@bar.batz' => null, 'lor@em.ips' => 'Lorem Ipsum']); $return = $transport->send($message); - $this->equalTo(2, $return); + $this->assertEquals(2, $return); } } diff --git a/tests/Unit/Renderer/HtmlEngineTest.php b/tests/Unit/Renderer/HtmlEngineTest.php index f76e7528..cb8578d3 100644 --- a/tests/Unit/Renderer/HtmlEngineTest.php +++ b/tests/Unit/Renderer/HtmlEngineTest.php @@ -65,7 +65,7 @@ class HtmlEngineTest extends TestCase protected function tearDown(): void { foreach ($this->tmpFileNames as $fileName) { - unlink($fileName); + file_exists($fileName) && unlink($fileName); } } } diff --git a/tests/autoload.php b/tests/autoload.php deleted file mode 100644 index ba79bad9..00000000 --- a/tests/autoload.php +++ /dev/null @@ -1,3 +0,0 @@ -