function TableTest::testThemeTableTitle

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableTitle()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableTitle()
  3. 10 core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableTitle()

Tests that the select/checkbox label is being generated and escaped.

File

core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php, line 300

Class

TableTest
Tests built-in table theme functions.

Namespace

Drupal\KernelTests\Core\Render\Element

Code

public function testThemeTableTitle() : void {
    $form = \Drupal::formBuilder()->getForm('\\Drupal\\form_test\\Form\\FormTestTableForm');
    $this->render($form);
    $this->assertEscaped('Update <em>kitten</em>');
    $this->assertRaw('Update my favorite fruit is <strong>bananas</strong>');
}

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