You are here

public function WebformElementHorizontalRuleTest::testHorizontalRule in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/Element/WebformElementHorizontalRuleTest.php \Drupal\Tests\webform\Functional\Element\WebformElementHorizontalRuleTest::testHorizontalRule()

Test horizontal rule element.

File

tests/src/Functional/Element/WebformElementHorizontalRuleTest.php, line 22

Class

WebformElementHorizontalRuleTest
Tests for horizontal rule element.

Namespace

Drupal\Tests\webform\Functional\Element

Code

public function testHorizontalRule() {
  $this
    ->drupalGet('/webform/test_element_horizontal_rule');

  // Check rendering.
  $this
    ->assertRaw('<hr data-drupal-selector="edit-horizontal-rule" id="edit-horizontal-rule" class="webform-horizontal-rule" />');
  $this
    ->assertRaw('<hr class="webform-horizontal-rule--dotted webform-horizontal-rule" style="border-color: red" data-drupal-selector="edit-horizontal-rule-custom" id="edit-horizontal-rule-custom" />');
}