public function TaggedHandlersPassTest::testProcessRequiredHandlers in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\TaggedHandlersPassTest::testProcessRequiredHandlers()
Tests a required consumer with no handlers.
@expectedException \Symfony\Component\DependencyInjection\Exception\LogicException @expectedExceptionMessage At least one service tagged with 'consumer_id' is required. @covers ::process
File
- core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ TaggedHandlersPassTest.php, line 51 - Contains \Drupal\Tests\Core\DependencyInjection\Compiler\TaggedHandlersPassTest.
Class
- TaggedHandlersPassTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjection\CompilerCode
public function testProcessRequiredHandlers() {
$container = $this
->buildContainer();
$container
->register('consumer_id', __NAMESPACE__ . '\\ValidConsumer')
->addTag('service_collector', array(
'required' => TRUE,
));
$handler_pass = new TaggedHandlersPass();
$handler_pass
->process($container);
}