public function AttributeTest::testStorage in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testStorage()
- 9 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testStorage()
Tests the storage method.
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 460
Class
- AttributeTest
- @coversDefaultClass \Drupal\Core\Template\Attribute @group Template
Namespace
Drupal\Tests\Core\TemplateCode
public function testStorage() {
$attribute = new Attribute([
'class' => [
'example-class',
],
]);
$this
->assertEquals([
'class' => new AttributeArray('class', [
'example-class',
]),
], $attribute
->storage());
}