Skip to content

Commit 553f39a

Browse files
authored
Update PHPUnit compatibility to 10.5.62 (#1077)
1 parent 551f46f commit 553f39a

File tree

6 files changed

+10
-48
lines changed

6 files changed

+10
-48
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"phpunit/php-code-coverage": "^10.1.7",
4444
"phpunit/php-file-iterator": "^4.1.0",
4545
"phpunit/php-timer": "^6.0",
46-
"phpunit/phpunit": "^10.4.2",
46+
"phpunit/phpunit": "^10.5.62",
4747
"sebastian/environment": "^6.0.1",
4848
"symfony/console": "^6.3.4 || ^7.0.0",
4949
"symfony/process": "^6.3.4 || ^7.0.0"
@@ -53,7 +53,7 @@
5353
"ext-posix": "*",
5454
"doctrine/coding-standard": "^12.0.0",
5555
"infection/infection": "^0.27.6",
56-
"phpstan/phpstan": "^1.10.40",
56+
"phpstan/phpstan": "^1.12.32",
5757
"phpstan/phpstan-deprecation-rules": "^1.1.4",
5858
"phpstan/phpstan-phpunit": "^1.3.15",
5959
"phpstan/phpstan-strict-rules": "^1.5.2",

src/WrapperRunner/ApplicationForWrapperWorker.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function runTest(string $testPath): int
108108

109109
$testSuite->run();
110110

111-
return TestResultFacade::result()->wasSuccessfulIgnoringPhpunitWarnings()
111+
return TestResultFacade::result()->wasSuccessful()
112112
? RunnerInterface::SUCCESS_EXIT
113113
: RunnerInterface::FAILURE_EXIT;
114114
}
@@ -191,7 +191,10 @@ private function bootstrap(): void
191191
}
192192

193193
if (isset($this->testdoxFile)) {
194-
$this->testdoxResultCollector = new TestResultCollector(EventFacade::instance());
194+
$this->testdoxResultCollector = new TestResultCollector(
195+
EventFacade::instance(),
196+
$this->configuration->source(),
197+
);
195198
}
196199

197200
TestResultFacade::init();

src/WrapperRunner/SuiteLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private function loadFiles(TestSuite $testSuite): Generator
142142
if ($test instanceof TestCase) {
143143
$refClass = new ReflectionClass($test);
144144
$filename = $refClass->getFileName();
145-
assert(is_string($filename) && $filename !== '');
145+
assert(is_string($filename));
146146
$filename = $this->stripCwd($filename);
147147

148148
yield $filename => $test;

src/WrapperRunner/WrapperRunner.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,7 @@ private function complete(TestResult $testResultSum): int
293293
$this->generateLogs();
294294

295295
$exitcode = (new ShellExitCodeCalculator())->calculate(
296-
$this->options->configuration->failOnDeprecation(),
297-
$this->options->configuration->failOnEmptyTestSuite(),
298-
$this->options->configuration->failOnIncomplete(),
299-
$this->options->configuration->failOnNotice(),
300-
$this->options->configuration->failOnRisky(),
301-
$this->options->configuration->failOnSkipped(),
302-
$this->options->configuration->failOnWarning(),
296+
$this->options->configuration,
303297
$testResultSum,
304298
);
305299

test/Unit/WrapperRunner/WrapperRunnerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public function testHandleUnexpectedOutput(): void
568568
There was 1 risky test:
569569
570570
1) ParaTest\Tests\fixtures\unexpected_output\UnexpectedOutputTest::testInvalidLogic
571-
This test printed output: foobar
571+
Test code or tested code printed unexpected output: foobar
572572
573573
%s/test/fixtures/unexpected_output/UnexpectedOutputTest.php:%d
574574
Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,35 @@
1-
21
##teamcity[testCount count='1' flowId='%d']
3-
42
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\ErrorTest' locationHint='php_qn://%s/test/fixtures/common_results/ErrorTest.php::\ParaTest\Tests\fixtures\common_results\ErrorTest' flowId='%d']
5-
63
##teamcity[testStarted name='testError' locationHint='php_qn://%s/test/fixtures/common_results/ErrorTest.php::\ParaTest\Tests\fixtures\common_results\ErrorTest::testError' flowId='%d']
7-
84
##teamcity[testFailed name='testError' message='RuntimeException: Error here!' details='%s/test/fixtures/common_results/ErrorTest.php:15|n' duration='%d' flowId='%d']
9-
105
##teamcity[testFinished name='testError' duration='%d' flowId='%d']
11-
126
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\ErrorTest' flowId='%d']
13-
147
##teamcity[testCount count='1' flowId='%d']
15-
168
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\FailureTest' locationHint='php_qn://%s/test/fixtures/common_results/FailureTest.php::\ParaTest\Tests\fixtures\common_results\FailureTest' flowId='%d']
17-
189
##teamcity[testStarted name='testFailure' locationHint='php_qn://%s/test/fixtures/common_results/FailureTest.php::\ParaTest\Tests\fixtures\common_results\FailureTest::testFailure' flowId='%d']
19-
2010
##teamcity[testFailed name='testFailure' message='Failed asserting that false is true.' details='%s/test/fixtures/common_results/FailureTest.php:14|n' duration='%d' flowId='%d']
21-
2211
##teamcity[testFinished name='testFailure' duration='%d' flowId='%d']
23-
2412
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\FailureTest' flowId='%d']
25-
2613
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\IncompleteTest' locationHint='php_qn://%s/test/fixtures/common_results/IncompleteTest.php::\ParaTest\Tests\fixtures\common_results\IncompleteTest' flowId='%d']
27-
2814
##teamcity[testStarted name='testIncomplete' locationHint='php_qn://%s/test/fixtures/common_results/IncompleteTest.php::\ParaTest\Tests\fixtures\common_results\IncompleteTest::testIncomplete' flowId='%d']
29-
3015
##teamcity[testIgnored name='testIncomplete' message='' details='%s/test/fixtures/common_results/IncompleteTest.php:14|n' duration='%d' flowId='%d']
31-
3216
##teamcity[testFinished name='testIncomplete' duration='%d' flowId='%d']
33-
3417
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\IncompleteTest' flowId='%d']
35-
3618
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\RiskyTest' locationHint='php_qn://%s/test/fixtures/common_results/RiskyTest.php::\ParaTest\Tests\fixtures\common_results\RiskyTest' flowId='%d']
37-
3819
##teamcity[testStarted name='testRisky' locationHint='php_qn://%s/test/fixtures/common_results/RiskyTest.php::\ParaTest\Tests\fixtures\common_results\RiskyTest::testRisky' flowId='%d']
39-
4020
##teamcity[testFailed name='testRisky' message='This test did not perform any assertions' details='' duration='%d' flowId='%d']
41-
4221
##teamcity[testFinished name='testRisky' duration='%d' flowId='%d']
43-
4422
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\RiskyTest' flowId='%d']
45-
4623
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\SkippedTest' locationHint='php_qn://%s/test/fixtures/common_results/SkippedTest.php::\ParaTest\Tests\fixtures\common_results\SkippedTest' flowId='%d']
47-
4824
##teamcity[testStarted name='testSkipped' locationHint='php_qn://%s/test/fixtures/common_results/SkippedTest.php::\ParaTest\Tests\fixtures\common_results\SkippedTest::testSkipped' flowId='%d']
49-
5025
##teamcity[testIgnored name='testSkipped' message='' duration='%d' flowId='%d']
51-
5226
##teamcity[testFinished name='testSkipped' duration='%d' flowId='%d']
53-
5427
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\SkippedTest' flowId='%d']
55-
5628
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\SuccessTest' locationHint='php_qn://%s/test/fixtures/common_results/SuccessTest.php::\ParaTest\Tests\fixtures\common_results\SuccessTest' flowId='%d']
57-
5829
##teamcity[testStarted name='testSuccess' locationHint='php_qn://%s/test/fixtures/common_results/SuccessTest.php::\ParaTest\Tests\fixtures\common_results\SuccessTest::testSuccess' flowId='%d']
59-
6030
##teamcity[testFinished name='testSuccess' duration='%d' flowId='%d']
61-
6231
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\SuccessTest' flowId='%d']
63-
6432
##teamcity[testSuiteStarted name='ParaTest\Tests\fixtures\common_results\WarningTest' locationHint='php_qn://%s/test/fixtures/common_results/WarningTest.php::\ParaTest\Tests\fixtures\common_results\WarningTest' flowId='%d']
65-
6633
##teamcity[testStarted name='testWarning' locationHint='php_qn://%s/test/fixtures/common_results/WarningTest.php::\ParaTest\Tests\fixtures\common_results\WarningTest::testWarning' flowId='%d']
67-
6834
##teamcity[testFinished name='testWarning' duration='%d' flowId='%d']
69-
7035
##teamcity[testSuiteFinished name='ParaTest\Tests\fixtures\common_results\WarningTest' flowId='%d']

0 commit comments

Comments
 (0)