Skip to content

Commit 7bf12df

Browse files
authored
Merge pull request Codeception#6054 from Codeception/phpunit-9.5
Fix test which was failing with PHPUnit 9.5
2 parents 556d5ad + 8311021 commit 7bf12df

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"codeception/module-db": "*@dev",
4242
"codeception/module-filesystem": "*@dev",
4343
"codeception/module-phpbrowser": "*@dev",
44-
"codeception/util-universalframework": "*@dev",
45-
"phpunit/phpunit": "<9.5"
44+
"codeception/util-universalframework": "*@dev"
4645
},
4746
"suggest": {
4847
"hoa/console": "For interactive console functionality",

tests/cli/RunCest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,11 @@ public function runCestWithTwoFailedTest(CliGuy $I)
558558
$I->seeInShellOutput('Failures: 2.');
559559
}
560560

561-
562-
public function runWarningTests(CliGuy $I)
561+
public function runWarningTests(CliGuy $I, \Codeception\Scenario $scenario)
563562
{
563+
if (version_compare(\PHPUnit\Runner\Version::id(), '9.5.0', '>=')) {
564+
$scenario->skip('This warning is an error since PHPUnit 9.5');
565+
}
564566
$I->executeCommand('run unit WarningTest.php', false);
565567
$I->seeInShellOutput('There was 1 warning');
566568
$I->seeInShellOutput('WarningTest::testWarningInvalidDataProvider');

0 commit comments

Comments
 (0)