function RulesDebugLoggerChannelTest::setUp
Overrides UnitTestCase::setUp
File
-
tests/
src/ Unit/ RulesDebugLoggerChannelTest.php, line 52
Class
- RulesDebugLoggerChannelTest
- @coversDefaultClass <a href="/api/rules/src%21Logger%21RulesDebugLoggerChannel.php/class/RulesDebugLoggerChannel/8.x-3.x" title="Logs rules log entries in the available loggers." class="local">\Drupal\rules\Logger\RulesDebugLoggerChannel</a> @group Rules
Namespace
Drupal\Tests\rules\UnitCode
protected function setUp() : void {
parent::setUp();
$container = new ContainerBuilder();
$this->rulesDebugLogger = $this->prophesize(LoggerChannelInterface::class)
->reveal();
$container->set('logger.channel.rules_debug', $this->rulesDebugLogger);
$this->session = new TestSession();
$container->set('session', $this->session);
$this->rulesDebugLog = new RulesDebugLog($this->session);
$container->set('logger.rules_debug_log', $this->rulesDebugLog);
\Drupal::setContainer($container);
$this->container = $container;
}