public function WebAssertTest::testPageTextNotMatches in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testPageTextNotMatches()
File
- vendor/
behat/ mink/ tests/ WebAssertTest.php, line 413
Class
Namespace
Behat\Mink\TestsCode
public function testPageTextNotMatches() {
$page = $this
->getMockBuilder('Behat\\Mink\\Element\\DocumentElement')
->disableOriginalConstructor()
->getMock();
$this->session
->expects($this
->exactly(2))
->method('getPage')
->will($this
->returnValue($page));
$page
->expects($this
->exactly(2))
->method('getText')
->will($this
->returnValue('Some html text'));
$this
->assertCorrectAssertion('pageTextNotMatches', array(
'/PA.E/i',
));
$this
->assertWrongAssertion('pageTextNotMatches', array(
'/HTML/i',
), 'Behat\\Mink\\Exception\\ResponseTextException', 'The pattern /HTML/i was found in the text of the current page, but it should not.');
}