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