/**
* Tests adding class attributes with the AttributeArray helper method.
* @covers ::addClass
*/
public function testAddClasses() { // Add empty Attribute object with no classes.
$attribute =
new Attribute();
// Add no class on empty attribute.
$attribute->
addClass();
$this->
assertEmpty($attribute['class'
]);
// Test various permutations of adding values to empty Attribute objects.
foreach ([NULL, FALSE, '',
[]] as $value) { // Single value.
$attribute->
addClass($value);
$this->
assertEmpty((string) $attribute);
// Multiple values.
$attribute->
addClass($value,
$value);
$this->
assertEmpty((string) $attribute);