public function ElementTest::providerTestSetAttributes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Render/ElementTest.php \Drupal\Tests\Core\Render\ElementTest::providerTestSetAttributes()
Data provider for testSetAttributes().
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ ElementTest.php, line 176 - Contains \Drupal\Tests\Core\Render\ElementTest.
Class
- ElementTest
- @coversDefaultClass \Drupal\Core\Render\Element @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function providerTestSetAttributes() {
$base = array(
'#id' => 'id',
'#class' => array(),
);
return array(
array(
$base,
array(),
$base,
),
array(
$base,
array(
'id',
'class',
),
$base + array(
'#attributes' => array(
'id' => 'id',
'class' => array(),
),
),
),
array(
$base + array(
'#attributes' => array(
'id' => 'id-not-overwritten',
),
),
array(
'id',
'class',
),
$base + array(
'#attributes' => array(
'id' => 'id-not-overwritten',
'class' => array(),
),
),
),
);
}