Skip to content

Commit da9bd26

Browse files
committed
Use expectException method instead of annotation in tests
1 parent 3c1868a commit da9bd26

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/unit/Codeception/Module/PhpBrowserTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use GuzzleHttp\Handler\MockHandler;
99
use GuzzleHttp\Psr7\Response;
10+
use PHPUnit\Framework\AssertionFailedError;
1011

1112
class PhpBrowserTest extends TestsForBrowsers
1213
{
@@ -617,11 +618,9 @@ public function testClickSelectsClickableElementFromMatchesUsingCssLocator()
617618
$this->module->seeCurrentUrlEquals('/info');
618619
}
619620

620-
/**
621-
* @expectedException PHPUnit\Framework\AssertionFailedError
622-
*/
623621
public function testClickingOnButtonOutsideFormDoesNotCauseFatalError()
624622
{
623+
$this->expectException(AssertionFailedError::class);
625624
$this->module->amOnPage('/form/button-not-in-form');
626625
$this->module->click('The Button');
627626
}

0 commit comments

Comments
 (0)