You are here

public function NodeElementTest::testSelectOptionNotFound 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::testSelectOptionNotFound()

@expectedException \Behat\Mink\Exception\ElementNotFoundException

File

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

Class

NodeElementTest

Namespace

Behat\Mink\Tests\Element

Code

public function testSelectOptionNotFound() {
  $node = new NodeElement('select', $this->session);
  $this->driver
    ->expects($this
    ->once())
    ->method('getTagName')
    ->with('select')
    ->will($this
    ->returnValue('select'));
  $this->driver
    ->expects($this
    ->exactly(2))
    ->method('find')
    ->with('select/option')
    ->will($this
    ->returnValue(array()));
  $this->selectors
    ->expects($this
    ->exactly(2))
    ->method('selectorToXpath')
    ->with($this
    ->logicalOr('named_exact', 'named_partial'), array(
    'option',
    'item1',
  ))
    ->will($this
    ->returnValue('option'));
  $node
    ->selectOption('item1');
}