You are here

public function ElementTest::testSetAttributes in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/ElementTest.php \Drupal\Tests\Core\Render\ElementTest::testSetAttributes()
  2. 10 core/tests/Drupal/Tests/Core/Render/ElementTest.php \Drupal\Tests\Core\Render\ElementTest::testSetAttributes()

Tests the setAttributes() method.

@dataProvider providerTestSetAttributes

File

core/tests/Drupal/Tests/Core/Render/ElementTest.php, line 162

Class

ElementTest
@coversDefaultClass \Drupal\Core\Render\Element @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function testSetAttributes($element, $map, $expected_element) {
  Element::setAttributes($element, $map);
  $this
    ->assertSame($expected_element, $element);
}