public function WebAssertTest::testResponseMatches in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testResponseMatches()
File
- vendor/
behat/ mink/ tests/ WebAssertTest.php, line 497
Class
Namespace
Behat\Mink\TestsCode
public function testResponseMatches() {
$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 page text'));
$this
->assertCorrectAssertion('responseMatches', array(
'/PA.E/i',
));
$this
->assertWrongAssertion('responseMatches', array(
'/html/',
), 'Behat\\Mink\\Exception\\ExpectationException', 'The pattern /html/ was not found anywhere in the HTML response of the page.');
}