function LoggerAwarePassTest::testExistingLogger
Tests that existing loggers are not overwritten.
@covers ::process
      
    
File
- 
              core/
modules/ system/ tests/ src/ Kernel/ DependencyInjection/ CompilerPass/ LoggerAwarePassTest.php, line 47  
Class
- LoggerAwarePassTest
 - Tests the logger aware compiler pass.
 
Namespace
Drupal\Tests\system\Kernel\DependencyInjection\CompilerPassCode
public function testExistingLogger() : void {
  $container = $this->container;
  $logger_aware_stub = $container->get('logger_aware_test.logger_aware_existing');
  $logger = $logger_aware_stub->getLogger();
  $this->assertInstanceOf(LoggerStub::class, $logger);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.