Beispiel #1
0
 public function testSelectField()
 {
     $node = $this->getMockBuilder('Behat\\Mink\\Element\\NodeElement')->disableOriginalConstructor()->getMock();
     $node->expects($this->once())->method('selectOption')->with('option2');
     $this->mockNamedFinder('//field', array($node), array('field', 'some field'));
     $this->document->selectFieldOption('some field', 'option2');
     $this->setExpectedException('Behat\\Mink\\Exception\\ElementNotFoundException');
     $this->document->selectFieldOption('some field', 'option2');
 }