public function WebAssertTest::testPageTextNotContains in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testPageTextNotContains()
File
- vendor/
behat/ mink/ tests/ WebAssertTest.php, line 357
Class
Namespace
Behat\Mink\TestsCode
public function testPageTextNotContains() {
$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\n\ttext"));
$this
->assertCorrectAssertion('pageTextNotContains', array(
'PAGE text',
));
$this
->assertWrongAssertion('pageTextNotContains', array(
'HTML text',
), 'Behat\\Mink\\Exception\\ResponseTextException', 'The text "HTML text" appears in the text of this page, but it should not.');
}