function AttributeTest::testRemove
Tests removing of values.
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 71
Class
- AttributeTest
- @coversDefaultClass \Drupal\Core\Template\Attribute[[api-linebreak]] @group Template
Namespace
Drupal\Tests\Core\TemplateCode
public function testRemove() {
$attribute = new Attribute([
'class' => [
'example-class',
],
]);
unset($attribute['class']);
$this->assertFalse(isset($attribute['class']));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.