You are here

public function WebAssertTest::testElementNotExistsArrayLocator in Zircon Profile 8

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

@dataProvider getArrayLocatorFormats

File

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

Class

WebAssertTest

Namespace

Behat\Mink\Tests

Code

public function testElementNotExistsArrayLocator($selector, $locator, $expectedMessage) {
  $page = $this
    ->getMockBuilder('Behat\\Mink\\Element\\DocumentElement')
    ->disableOriginalConstructor()
    ->getMock();
  $this->session
    ->expects($this
    ->once())
    ->method('getPage')
    ->will($this
    ->returnValue($page));
  $page
    ->expects($this
    ->once())
    ->method('find')
    ->with($selector, $locator)
    ->will($this
    ->returnValue(1));
  $this
    ->assertWrongAssertion('elementNotExists', array(
    $selector,
    $locator,
  ), 'Behat\\Mink\\Exception\\ExpectationException', $expectedMessage);
}