Skip to content

Commit

Permalink
Merge pull request #6054 from Codeception/phpunit-9.5
Browse files Browse the repository at this point in the history
Fix test which was failing with PHPUnit 9.5
  • Loading branch information
Naktibalda committed Dec 18, 2020
2 parents 556d5ad + 8311021 commit 7bf12df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -41,8 +41,7 @@
"codeception/module-db": "*@dev",
"codeception/module-filesystem": "*@dev",
"codeception/module-phpbrowser": "*@dev",
"codeception/util-universalframework": "*@dev",
"phpunit/phpunit": "<9.5"
"codeception/util-universalframework": "*@dev"
},
"suggest": {
"hoa/console": "For interactive console functionality",
Expand Down
6 changes: 4 additions & 2 deletions tests/cli/RunCest.php
Expand Up @@ -558,9 +558,11 @@ public function runCestWithTwoFailedTest(CliGuy $I)
$I->seeInShellOutput('Failures: 2.');
}


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

0 comments on commit 7bf12df

Please sign in to comment.