public function CheckboxTest::testCheckboxMultiple in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/driver-testsuite/tests/Form/CheckboxTest.php \Behat\Mink\Tests\Driver\Form\CheckboxTest::testCheckboxMultiple()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Form/ CheckboxTest.php, line 49
Class
Namespace
Behat\Mink\Tests\Driver\FormCode
public function testCheckboxMultiple() {
$this
->getSession()
->visit($this
->pathTo('/multicheckbox_form.html'));
$webAssert = $this
->getAssertSession();
$this
->assertEquals('Multicheckbox Test', $webAssert
->elementExists('css', 'h1')
->getText());
$updateMail = $webAssert
->elementExists('css', '[name="mail_types[]"][value="update"]');
$spamMail = $webAssert
->elementExists('css', '[name="mail_types[]"][value="spam"]');
$this
->assertEquals('update', $updateMail
->getValue());
$this
->assertNull($spamMail
->getValue());
$this
->assertTrue($updateMail
->isChecked());
$this
->assertFalse($spamMail
->isChecked());
$updateMail
->uncheck();
$this
->assertFalse($updateMail
->isChecked());
$this
->assertFalse($spamMail
->isChecked());
$spamMail
->check();
$this
->assertFalse($updateMail
->isChecked());
$this
->assertTrue($spamMail
->isChecked());
}