You are here

public function NodeElementTest::testElementIsNotValid in Zircon Profile 8

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

File

vendor/behat/mink/tests/Element/NodeElementTest.php, line 59

Class

NodeElementTest

Namespace

Behat\Mink\Tests\Element

Code

public function testElementIsNotValid() {
  $node = new NodeElement('some xpath', $this->session);
  $this->driver
    ->expects($this
    ->exactly(2))
    ->method('find')
    ->with('some xpath')
    ->will($this
    ->onConsecutiveCalls(array(), array(
    'xpath1',
    'xpath2',
  )));
  $this
    ->assertFalse($node
    ->isValid(), 'no elements found is invalid element');
  $this
    ->assertFalse($node
    ->isValid(), 'more then 1 element found is invalid element');
}