function RenderElementTest::testSetAttributes

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php \Drupal\Tests\Core\Render\Element\RenderElementTest::testSetAttributes()

Tests set attributes.

Attributes

#[DataProvider('providerTestSetAttributes')]

File

core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php, line 135

Class

RenderElementTest
Tests Drupal\Core\Render\Element\RenderElementBase.

Namespace

Drupal\Tests\Core\Render\Element

Code

public function testSetAttributes(array $element, array $class, array $expected) : void {
  RenderElementBase::setAttributes($element, $class);
  $this->assertSame($expected, $element);
}

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