function AttributeHelperTest::testMergeCollectionsAttributeWithStringArgumentException
Tests merge collections argument exception.
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeHelperTest.php, line 94
Class
Namespace
Drupal\Tests\Core\TemplateCode
public function testMergeCollectionsAttributeWithStringArgumentException() : void {
$attributes = new Attribute([
'class' => [
'example-class',
],
]);
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessageIs('Invalid collection argument');
// @phpstan-ignore argument.type
AttributeHelper::mergeCollections($attributes, 'not an array');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.