You are here

public function ElementTest::testSetAttributes in Drupal 8

Same name and namespace in other branches
  1. 9 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 163

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);
}