You are here

public function WebAssertTest::testAddressMatches in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/WebAssertTest.php \Behat\Mink\Tests\WebAssertTest::testAddressMatches()

File

vendor/behat/mink/tests/WebAssertTest.php, line 110

Class

WebAssertTest

Namespace

Behat\Mink\Tests

Code

public function testAddressMatches() {
  $this->session
    ->expects($this
    ->exactly(2))
    ->method('getCurrentUrl')
    ->will($this
    ->returnValue('http://example.com/script.php/sub/url'));
  $this
    ->assertCorrectAssertion('addressMatches', array(
    '/su.*rl/',
  ));
  $this
    ->assertWrongAssertion('addressMatches', array(
    '/suburl/',
  ), 'Behat\\Mink\\Exception\\ExpectationException', 'Current page "/sub/url" does not match the regex "/suburl/".');
}