function ElementTest::testDetailsSummaryAttributes

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Form/ElementTest.php \Drupal\Tests\system\Functional\Form\ElementTest::testDetailsSummaryAttributes()
  2. 8.9.x core/modules/system/tests/src/Functional/Form/ElementTest.php \Drupal\Tests\system\Functional\Form\ElementTest::testDetailsSummaryAttributes()
  3. 10 core/modules/system/tests/src/Functional/Form/ElementTest.php \Drupal\Tests\system\Functional\Form\ElementTest::testDetailsSummaryAttributes()

Tests summary attributes of details.

1 call to ElementTest::testDetailsSummaryAttributes()
ElementTest::testFormElements in core/modules/system/tests/src/Functional/Form/ElementTest.php
Test form elements.

File

core/modules/system/tests/src/Functional/Form/ElementTest.php, line 215

Class

ElementTest
Tests building and processing of core form elements.

Namespace

Drupal\Tests\system\Functional\Form

Code

protected function testDetailsSummaryAttributes() : void {
    $this->drupalGet('form-test/group-details');
    $this->assertSession()
        ->elementExists('css', 'summary[data-summary-attribute="test"]');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.