function HtmlTagTest::testGetInfo

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php \Drupal\Tests\Core\Render\Element\HtmlTagTest::testGetInfo()
  2. 8.9.x core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php \Drupal\Tests\Core\Render\Element\HtmlTagTest::testGetInfo()
  3. 10 core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php \Drupal\Tests\Core\Render\Element\HtmlTagTest::testGetInfo()

@covers ::getInfo

File

core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php, line 20

Class

HtmlTagTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Render%21Element%21HtmlTag.php/class/HtmlTag/11.x" title="Provides a render element for any HTML tag, with properties and value." class="local">\Drupal\Core\Render\Element\HtmlTag</a> @group Render

Namespace

Drupal\Tests\Core\Render\Element

Code

public function testGetInfo() : void {
    $htmlTag = new HtmlTag([], 'test', 'test');
    $info = $htmlTag->getInfo();
    $this->assertArrayHasKey('#pre_render', $info);
    $this->assertArrayHasKey('#attributes', $info);
    $this->assertArrayHasKey('#value', $info);
}

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