public function DocumentElementTest::testHasCheckedField in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/tests/Element/DocumentElementTest.php \Behat\Mink\Tests\Element\DocumentElementTest::testHasCheckedField()
File
- vendor/
behat/ mink/ tests/ Element/ DocumentElementTest.php, line 192
Class
Namespace
Behat\Mink\Tests\ElementCode
public function testHasCheckedField() {
$checkbox = $this
->getMockBuilder('Behat\\Mink\\Element\\NodeElement')
->disableOriginalConstructor()
->getMock();
$checkbox
->expects($this
->exactly(2))
->method('isChecked')
->will($this
->onConsecutiveCalls(true, false));
$this
->mockNamedFinder('//field', array(
array(
$checkbox,
),
array(),
array(
$checkbox,
),
), array(
'field',
'some checkbox',
), 3);
$this
->assertTrue($this->document
->hasCheckedField('some checkbox'));
$this
->assertFalse($this->document
->hasCheckedField('some checkbox'));
$this
->assertFalse($this->document
->hasCheckedField('some checkbox'));
}