function TaggedHandlersPassTest::testProcessNoConsumers
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\TaggedHandlersPassTest::testProcessNoConsumers()
- 10 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\TaggedHandlersPassTest::testProcessNoConsumers()
- 11.x core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\TaggedHandlersPassTest::testProcessNoConsumers()
Tests without any consumers.
@covers ::process
File
-
core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ TaggedHandlersPassTest.php, line 33
Class
- TaggedHandlersPassTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjection\CompilerCode
public function testProcessNoConsumers() {
$container = $this->buildContainer();
$container->register('consumer_id', __NAMESPACE__ . '\\ValidConsumer');
$handler_pass = new TaggedHandlersPass();
$handler_pass->process($container);
$this->assertCount(2, $container->getDefinitions());
$this->assertFalse($container->getDefinition('consumer_id')
->hasMethodCall('addHandler'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.