public function AttributeTest::testRemove in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testRemove()
- 10 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::testRemove()
Tests removing of values.
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 70
Class
- AttributeTest
- @coversDefaultClass \Drupal\Core\Template\Attribute @group Template
Namespace
Drupal\Tests\Core\TemplateCode
public function testRemove() {
$attribute = new Attribute([
'class' => [
'example-class',
],
]);
unset($attribute['class']);
$this
->assertFalse(isset($attribute['class']));
}