Skip to content

Commit 5ae8e2f

Browse files
authored
Maestro updates to PHPUnit 9.0 (#20)
1 parent d4ed408 commit 5ae8e2f

12 files changed

+27
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/composer.lock
66
/.php_cs.cache
77
/stubs
8+
.phpunit.result.cache

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"ergebnis/composer-normalize": "^2.0",
1818
"friendsofphp/php-cs-fixer": "^2.17",
1919
"phpstan/phpstan": "~0.12.0",
20-
"phpunit/phpunit": "~7.0",
21-
"symfony/filesystem": "^3.2"
20+
"phpunit/phpunit": "^9.0",
21+
"symfony/filesystem": "^4.2 || ^5.0",
22+
"phpspec/prophecy-phpunit": "^2.0"
2223
},
2324
"extra": {
2425
"branch-alias": {

phpunit.xml.dist

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit
5-
colors="true"
6-
bootstrap="vendor/autoload.php"
7-
>
8-
9-
<testsuites>
10-
<testsuite name="Composer Inflector">
11-
<directory>./tests</directory>
12-
</testsuite>
13-
</testsuites>
14-
15-
<filter>
16-
<whitelist addUncoveredFilesFromWhitelist="true">
17-
<directory>.</directory>
18-
<exclude>
19-
<directory>vendor/</directory>
20-
</exclude>
21-
</whitelist>
22-
</filter>
23-
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
4+
<coverage includeUncoveredFiles="true">
5+
<include>
6+
<directory>.</directory>
7+
</include>
8+
<exclude>
9+
<directory>vendor/</directory>
10+
</exclude>
11+
</coverage>
12+
<testsuites>
13+
<testsuite name="Composer Inflector">
14+
<directory>./tests</directory>
15+
</testsuite>
16+
</testsuites>
2417
</phpunit>

tests/Integration/ClassToFileConverterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ClassToFileConverterTest extends IntegrationTestCase
1313
{
1414
private $classLoader;
1515

16-
public function setUp()
16+
public function setUp(): void
1717
{
1818
$this->classLoader = require __DIR__.'/../../vendor/autoload.php';
1919
}

tests/Integration/Composer/ComposerClassToFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ComposerClassToFileTest extends ComposerTestCase
2424
*/
2525
private $converter;
2626

27-
public function setUp()
27+
public function setUp(): void
2828
{
2929
$this->initWorkspace();
3030
$this->logger = $this->prophesize(LoggerInterface::class);

tests/Integration/Composer/ComposerFileToClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
class ComposerFileToClassTest extends ComposerTestCase
1414
{
15-
public function setUp()
15+
public function setUp(): void
1616
{
1717
$this->initWorkspace();
1818
}

tests/Integration/Composer/ComposerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
abstract class ComposerTestCase extends IntegrationTestCase
1212
{
13-
public function setUp()
13+
public function setUp(): void
1414
{
1515
$this->initWorkspace();
1616
}

tests/Integration/Simple/SimpleClassToFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SimpleClassToFileTest extends SimpleTestCase
1414
*/
1515
private $classToFile;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->initWorkspace();
2020
$this->copyProject();

tests/Integration/Simple/SimpleFileToClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SimpleFileToClassTest extends SimpleTestCase
1414
*/
1515
private $fileToClass;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->initWorkspace();
2020
$this->copyProject();

tests/Unit/ChainClassToFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ChainClassToFileTest extends TestCase
1414
private $classToFile1;
1515
private $classToFile2;
1616

17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
$this->classToFile1 = $this->prophesize(ClassToFile::class);
2020
$this->classToFile2 = $this->prophesize(ClassToFile::class);

0 commit comments

Comments
 (0)