function LoggerChannelFactoryTest::testDeprecatedSetContainer
@covers ::setContainer @group legacy
File
-
core/
tests/ Drupal/ Tests/ Core/ Logger/ LoggerChannelFactoryTest.php, line 75
Class
- LoggerChannelFactoryTest
- @coversDefaultClass \Drupal\Core\Logger\LoggerChannelFactory @group Logger
Namespace
Drupal\Tests\Core\LoggerCode
public function testDeprecatedSetContainer() : void {
$factory = new LoggerChannelFactory($this->createMock(RequestStack::class), $this->createMock(AccountInterface::class));
$this->expectDeprecation('Calling Drupal\\Core\\Logger\\LoggerChannelFactory::setContainer() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use dependency injection instead. See https://www.drupal.org/node/3416354');
$factory->setContainer();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.