public function WebAssertTest::testResponseNotContains in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testResponseNotContains()
File
- vendor/
behat/ mink/ tests/ WebAssertTest.php, line 469
Class
Namespace
Behat\Mink\TestsCode
public function testResponseNotContains() {
$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('getContent')
->will($this
->returnValue('Some html text'));
$this
->assertCorrectAssertion('responseNotContains', array(
'PAGE text',
));
$this
->assertWrongAssertion('responseNotContains', array(
'HTML text',
), 'Behat\\Mink\\Exception\\ExpectationException', 'The string "HTML text" appears in the HTML response of this page, but it should not.');
}