Skip to content

Commit

Permalink
Update PHPUnit compatibility to 10.4.0 (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk authored Oct 6, 2023
1 parent 882b02d commit 1f9e41c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ all: csfix static-analysis code-coverage

vendor: composer.json
composer update
#composer bump
composer bump
touch vendor

.PHONY: csfix
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"ext-pcre": "*",
"ext-reflection": "*",
"ext-simplexml": "*",
"fidry/cpu-core-counter": "^0.4.1 || ^0.5.1",
"fidry/cpu-core-counter": "^0.5.1",
"jean85/pretty-package-versions": "^2.0.5",
"phpunit/php-code-coverage": "^10.1.3",
"phpunit/php-file-iterator": "^4.0.2",
"phpunit/php-code-coverage": "^10.1.7",
"phpunit/php-file-iterator": "^4.1.0",
"phpunit/php-timer": "^6.0",
"phpunit/phpunit": "^10.3.2",
"phpunit/phpunit": "^10.4.0",
"sebastian/environment": "^6.0.1",
"symfony/console": "^6.3.4",
"symfony/process": "^6.3.4"
Expand All @@ -52,8 +52,8 @@
"ext-pcov": "*",
"ext-posix": "*",
"doctrine/coding-standard": "^12.0.0",
"infection/infection": "^0.27.0",
"phpstan/phpstan": "^1.10.32",
"infection/infection": "^0.27.3",
"phpstan/phpstan": "^1.10.37",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.14",
"phpstan/phpstan-strict-rules": "^1.5.1",
Expand Down
2 changes: 1 addition & 1 deletion src/ParaTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$input,
$this->cwd,
);
if (! $options->configuration->hasConfigurationFile() && ! $options->configuration->hasCliArgument()) {
if (! $options->configuration->hasConfigurationFile() && ! $options->configuration->hasCliArguments()) {
return $this->displayHelp($output);
}

Expand Down
4 changes: 3 additions & 1 deletion src/WrapperRunner/ApplicationForWrapperWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public function runTest(string $testPath): int
$filter = null;
if ($null !== false) {
$filter = new Factory();
$filter->addNameFilter(substr($testPath, $null + 1));
$name = substr($testPath, $null + 1);
assert($name !== '');
$filter->addNameFilter($name);
$testPath = substr($testPath, 0, $null);
}

Expand Down
1 change: 1 addition & 0 deletions src/WrapperRunner/WrapperRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ private function complete(TestResult $testResultSum): int
array_merge_recursive($testResultSum->phpDeprecations(), $testResult->phpDeprecations()),
array_merge_recursive($testResultSum->phpNotices(), $testResult->phpNotices()),
array_merge_recursive($testResultSum->phpWarnings(), $testResult->phpWarnings()),
$testResultSum->numberOfIssuesIgnoredByBaseline() + $testResult->numberOfIssuesIgnoredByBaseline(),
);
}

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function testProvidedOptions(): void
self::assertSame(5, $options->maxBatchSize);
self::assertTrue($options->noTestTokens);
self::assertSame(['-d', 'a=1'], $options->passthruPhp);
self::assertSame('PATH', $options->configuration->cliArgument());
self::assertSame('PATH', $options->configuration->cliArguments()[0]);
self::assertSame(999, $options->processes);
self::assertSame('MYRUNNER', $options->runner);
self::assertSame($tmpDir, $options->tmpDir);
Expand Down
1 change: 1 addition & 0 deletions test/Unit/WrapperRunner/ResultPrinterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ private function getEmptyTestResult(): TestResult
[],
[],
[],
0,
);
}
}

0 comments on commit 1f9e41c

Please sign in to comment.