public function TaggedHandlersPassTest::testProcessMissingInterface 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::testProcessMissingInterface()
Tests consumer with missing interface in non-production environment.
@expectedException \Symfony\Component\DependencyInjection\Exception\LogicException @expectedExceptionMessage Service consumer 'consumer_id' class method Drupal\Tests\Core\DependencyInjection\Compiler\InvalidConsumer::addHandler() has to type-hint an interface. @covers ::process
File
- core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ TaggedHandlersPassTest.php, line 70 - 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 testProcessMissingInterface() {
$container = $this
->buildContainer();
$container
->register('consumer_id', __NAMESPACE__ . '\\InvalidConsumer')
->addTag('service_collector');
$handler_pass = new TaggedHandlersPass();
$handler_pass
->process($container);
}