You are here

public function AttributeTest::testRemove in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 74
Contains \Drupal\Tests\Core\Template\AttributeTest.

Class

AttributeTest
@coversDefaultClass \Drupal\Core\Template\Attribute @group Template

Namespace

Drupal\Tests\Core\Template

Code

public function testRemove() {
  $attribute = new Attribute(array(
    'class' => array(
      'example-class',
    ),
  ));
  unset($attribute['class']);
  $this
    ->assertFalse(isset($attribute['class']));
}