From baa87ac1545201d9bd77cf7f345c132d86721604 Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Thu, 24 Dec 2020 17:18:53 +0000 Subject: [PATCH] Maestro updates to PHPUnit 9.0 --- .gitignore | 1 + composer.json | 7 ++-- phpunit.xml.dist | 35 ++++++++----------- .../Integration/ClassToFileConverterTest.php | 2 +- .../Composer/ComposerClassToFileTest.php | 2 +- .../Composer/ComposerFileToClassTest.php | 2 +- .../Integration/Composer/ComposerTestCase.php | 2 +- .../Simple/SimpleClassToFileTest.php | 2 +- .../Simple/SimpleFileToClassTest.php | 2 +- tests/Unit/ChainClassToFileTest.php | 2 +- tests/Unit/ChainFileToClassTest.php | 2 +- tests/Unit/CompositeTransformerTest.php | 2 +- 12 files changed, 28 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 217f2292..a0239343 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /composer.lock /.php_cs.cache /stubs +.phpunit.result.cache diff --git a/composer.json b/composer.json index e38f9fd8..e70dc691 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,15 @@ "require": { "php": "^7.3", "psr/log": "^1.0", - "webmozart/path-util": "^2.3" + "webmozart/path-util": "^2.3", + "symfony/filesystem": "^4.2 || ^5.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.0", "friendsofphp/php-cs-fixer": "^2.17", "phpstan/phpstan": "~0.12.0", - "phpunit/phpunit": "~7.0", - "symfony/filesystem": "^3.2" + "phpunit/phpunit": "^9.0", + "rector/rector": "0.8.52" }, "extra": { "branch-alias": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e770452d..5e4ab4b4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,17 @@ - - - - - - ./tests - - - - - - . - - vendor/ - - - - + + + + . + + + vendor/ + + + + + ./tests + + diff --git a/tests/Integration/ClassToFileConverterTest.php b/tests/Integration/ClassToFileConverterTest.php index 98625678..0ba03946 100644 --- a/tests/Integration/ClassToFileConverterTest.php +++ b/tests/Integration/ClassToFileConverterTest.php @@ -13,7 +13,7 @@ class ClassToFileConverterTest extends IntegrationTestCase { private $classLoader; - public function setUp() + public function setUp(): void { $this->classLoader = require __DIR__.'/../../vendor/autoload.php'; } diff --git a/tests/Integration/Composer/ComposerClassToFileTest.php b/tests/Integration/Composer/ComposerClassToFileTest.php index f8116d4d..476c1e3f 100644 --- a/tests/Integration/Composer/ComposerClassToFileTest.php +++ b/tests/Integration/Composer/ComposerClassToFileTest.php @@ -24,7 +24,7 @@ class ComposerClassToFileTest extends ComposerTestCase */ private $converter; - public function setUp() + public function setUp(): void { $this->initWorkspace(); $this->logger = $this->prophesize(LoggerInterface::class); diff --git a/tests/Integration/Composer/ComposerFileToClassTest.php b/tests/Integration/Composer/ComposerFileToClassTest.php index f19eca7b..81df8267 100644 --- a/tests/Integration/Composer/ComposerFileToClassTest.php +++ b/tests/Integration/Composer/ComposerFileToClassTest.php @@ -12,7 +12,7 @@ */ class ComposerFileToClassTest extends ComposerTestCase { - public function setUp() + public function setUp(): void { $this->initWorkspace(); } diff --git a/tests/Integration/Composer/ComposerTestCase.php b/tests/Integration/Composer/ComposerTestCase.php index 5819d450..4dc1b3cc 100644 --- a/tests/Integration/Composer/ComposerTestCase.php +++ b/tests/Integration/Composer/ComposerTestCase.php @@ -10,7 +10,7 @@ */ abstract class ComposerTestCase extends IntegrationTestCase { - public function setUp() + public function setUp(): void { $this->initWorkspace(); } diff --git a/tests/Integration/Simple/SimpleClassToFileTest.php b/tests/Integration/Simple/SimpleClassToFileTest.php index 599531af..d569fa7f 100644 --- a/tests/Integration/Simple/SimpleClassToFileTest.php +++ b/tests/Integration/Simple/SimpleClassToFileTest.php @@ -14,7 +14,7 @@ class SimpleClassToFileTest extends SimpleTestCase */ private $classToFile; - public function setUp() + public function setUp(): void { $this->initWorkspace(); $this->copyProject(); diff --git a/tests/Integration/Simple/SimpleFileToClassTest.php b/tests/Integration/Simple/SimpleFileToClassTest.php index bb140bed..7fdd82a3 100644 --- a/tests/Integration/Simple/SimpleFileToClassTest.php +++ b/tests/Integration/Simple/SimpleFileToClassTest.php @@ -14,7 +14,7 @@ class SimpleFileToClassTest extends SimpleTestCase */ private $fileToClass; - public function setUp() + public function setUp(): void { $this->initWorkspace(); $this->copyProject(); diff --git a/tests/Unit/ChainClassToFileTest.php b/tests/Unit/ChainClassToFileTest.php index c36f4772..57c5b94f 100644 --- a/tests/Unit/ChainClassToFileTest.php +++ b/tests/Unit/ChainClassToFileTest.php @@ -14,7 +14,7 @@ class ChainClassToFileTest extends TestCase private $classToFile1; private $classToFile2; - public function setUp() + public function setUp(): void { $this->classToFile1 = $this->prophesize(ClassToFile::class); $this->classToFile2 = $this->prophesize(ClassToFile::class); diff --git a/tests/Unit/ChainFileToClassTest.php b/tests/Unit/ChainFileToClassTest.php index 16c105ea..434043e2 100644 --- a/tests/Unit/ChainFileToClassTest.php +++ b/tests/Unit/ChainFileToClassTest.php @@ -14,7 +14,7 @@ class ChainFileToClassTest extends TestCase private $fileToClass1; private $fileToClass2; - public function setUp() + public function setUp(): void { $this->fileToClass1 = $this->prophesize(FileToClass::class); $this->fileToClass2 = $this->prophesize(FileToClass::class); diff --git a/tests/Unit/CompositeTransformerTest.php b/tests/Unit/CompositeTransformerTest.php index a70dea54..28f78b79 100644 --- a/tests/Unit/CompositeTransformerTest.php +++ b/tests/Unit/CompositeTransformerTest.php @@ -15,7 +15,7 @@ class CompositeTransformerTest extends TestCase { private $transformer; - public function setUp() + public function setUp(): void { $this->classToFile = $this->prophesize(ClassToFile::class); $this->fileToClassCandidates = $this->prophesize(FileToClass::class);