From c7fcc09af65202ebfa28ae935163eaddacf641d3 Mon Sep 17 00:00:00 2001 From: Henrique Moody Date: Wed, 22 Aug 2018 23:25:46 +0200 Subject: [PATCH] Upgrade PHPUnit version The changes you see in this commit had to be made due to the upgrade of PHPunit version. Signed-off-by: Henrique Moody --- composer.json | 2 +- phpunit.xml.dist | 3 +-- tests/unit/Exceptions/NestedValidationExceptionTest.php | 4 ++-- tests/unit/Rules/MimetypeTest.php | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index af8848a9..f7d09918 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "malukenho/docheader": "^0.1.4", "mikey179/vfsStream": "^1.6", "phpstan/phpstan": "^0.10.3", - "phpunit/phpunit": "^6.4", + "phpunit/phpunit": "^7.3", "symfony/validator": "^3.0||^4.0", "zendframework/zend-validator": "^2.0" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a9e1285d..1ca1cfdf 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,8 +7,7 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" - verbose="false"> + verbose="true"> tests/unit/ diff --git a/tests/unit/Exceptions/NestedValidationExceptionTest.php b/tests/unit/Exceptions/NestedValidationExceptionTest.php index 4b4207cd..8a46765e 100644 --- a/tests/unit/Exceptions/NestedValidationExceptionTest.php +++ b/tests/unit/Exceptions/NestedValidationExceptionTest.php @@ -29,7 +29,7 @@ class NestedValidationExceptionTest extends TestCase $node = new IntValException('input', 'id', [], 'trim'); $composite->addChild($node); self::assertCount(1, $composite->getChildren(true)); - self::assertContainsOnly($node, $composite->getChildren()); + self::assertContainsOnly(IntValException::class, $composite->getChildren()); } /** @@ -43,6 +43,6 @@ class NestedValidationExceptionTest extends TestCase $composite->addChild($node); $composite->addChild($node); self::assertCount(1, $composite->getChildren(true)); - self::assertContainsOnly($node, $composite->getChildren()); + self::assertContainsOnly(IntValException::class, $composite->getChildren()); } } diff --git a/tests/unit/Rules/MimetypeTest.php b/tests/unit/Rules/MimetypeTest.php index d0cdd0a5..48771109 100644 --- a/tests/unit/Rules/MimetypeTest.php +++ b/tests/unit/Rules/MimetypeTest.php @@ -26,10 +26,10 @@ class MimetypeTest extends TestCase { private $filename; - protected function setUp() + protected function setUp(): void { if (defined('HHVM_VERSION')) { - return self::markTestSkipped('If you are a HHVM user, and you are in the mood, please fix it'); + self::markTestSkipped('If you are a HHVM user, and you are in the mood, please fix it'); } $this->filename = sprintf('%s/validation.txt', sys_get_temp_dir());