public function DefinitionTest::testClearTags

@covers Symfony\Component\DependencyInjection\Definition::clearTags

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 181

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testClearTags() {
  $def = new Definition('stdClass');
  $this
    ->assertSame($def, $def
    ->clearTags(), '->clearTags() implements a fluent interface');
  $def
    ->addTag('foo', array(
    'foo' => 'bar',
  ));
  $def
    ->clearTags();
  $this
    ->assertEquals(array(), $def
    ->getTags(), '->clearTags() removes all current tags');
}