public function WebformElementAttributesTest::testAttributes in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Functional/Element/WebformElementAttributesTest.php \Drupal\Tests\webform\Functional\Element\WebformElementAttributesTest::testAttributes()
Tests element attributes.
File
- tests/
src/ Functional/ Element/ WebformElementAttributesTest.php, line 22
Class
- WebformElementAttributesTest
- Tests for webform element attributes.
Namespace
Drupal\Tests\webform\Functional\ElementCode
public function testAttributes() {
// Check default value handling.
$this
->drupalPostForm('/webform/test_element_attributes', [], 'Submit');
$this
->assertRaw("webform_element_attributes:\n class:\n - one\n - two\n - four\n style: 'color: red'\n custom: test");
}