You are here

public function DocumentElementTest::testCheckField in Zircon Profile 8

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

File

vendor/behat/mink/tests/Element/DocumentElementTest.php, line 321

Class

DocumentElementTest

Namespace

Behat\Mink\Tests\Element

Code

public function testCheckField() {
  $node = $this
    ->getMockBuilder('Behat\\Mink\\Element\\NodeElement')
    ->disableOriginalConstructor()
    ->getMock();
  $node
    ->expects($this
    ->once())
    ->method('check');
  $this
    ->mockNamedFinder('//field', array(
    $node,
  ), array(
    'field',
    'some field',
  ));
  $this->document
    ->checkField('some field');
  $this
    ->setExpectedException('Behat\\Mink\\Exception\\ElementNotFoundException');
  $this->document
    ->checkField('some field');
}