function RenderElementTest::testSetAttributes

Tests set attributes.

@legacy-covers ::setAttributes

Attributes

#[DataProvider('providerTestSetAttributes')]

File

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

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.