You are here

WebformElementAttributesTest.php in Webform 8.5

Same filename and directory in other branches
  1. 6.x tests/src/Functional/Element/WebformElementAttributesTest.php

File

tests/src/Functional/Element/WebformElementAttributesTest.php
View source
<?php

namespace Drupal\Tests\webform\Functional\Element;


/**
 * Tests for webform element attributes.
 *
 * @group webform
 */
class WebformElementAttributesTest extends WebformElementBrowserTestBase {

  /**
   * Webforms to load.
   *
   * @var array
   */
  protected static $testWebforms = [
    'test_element_attributes',
  ];

  /**
   * Tests element attributes.
   */
  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");
  }

}

Classes

Namesort descending Description
WebformElementAttributesTest Tests for webform element attributes.