public function FormOptionsAttributesTest::testCheckboxes in Form Options Attributes 2.0.x
Same name and namespace in other branches
- 8 tests/modules/form_options_attributes_test/src/Tests/FormOptionsAttributesTest.php \Drupal\form_options_attributes_test\Tests\FormOptionsAttributesTest::testCheckboxes()
Test form #options_attributes on checkboxes elements
File
- tests/
modules/ form_options_attributes_test/ src/ Tests/ FormOptionsAttributesTest.php, line 64
Class
- FormOptionsAttributesTest
- Tests the #options_attributes functionality of select, checkboxes, and radios.
Namespace
Drupal\form_options_attributes_test\TestsCode
public function testCheckboxes() {
$this
->drupalGet('form-options-attributes-test');
$this
->assertSession()
->elementAttributeContains('css', 'input.southeast.form-checkbox', 'data-bbq-meat', 'pork');
}