public function FormOptionsAttributesTest::testSelect 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::testSelect()
Test form #options_attributes on select elements
File
- tests/
modules/ form_options_attributes_test/ src/ Tests/ FormOptionsAttributesTest.php, line 40
Class
- FormOptionsAttributesTest
- Tests the #options_attributes functionality of select, checkboxes, and radios.
Namespace
Drupal\form_options_attributes_test\TestsCode
public function testSelect() {
$this
->drupalGet('/form-options-attributes-test');
$this
->assertSession()
->elementAttributeContains('css', 'select option.southeast', 'data-bbq-meat', 'pork');
}