public function AttributeTest::testMergeArgumentException in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testMergeArgumentException()
- 9 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testMergeArgumentException()
@covers ::merge
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 518
Class
- AttributeTest
- @coversDefaultClass \Drupal\Core\Template\Attribute @group Template
Namespace
Drupal\Tests\Core\TemplateCode
public function testMergeArgumentException() {
$attributes = new Attribute([
'class' => [
'example-class',
],
]);
$this
->expectException(\TypeError::class);
$attributes
->merge('not an array');
}