Skip to content

Commit 7ed2209

Browse files
committed
Merge branch '3.x' into 4.x
* 3.x: Test Noop handler
2 parents d4f240d + 8caf809 commit 7ed2209

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/DependencyInjection/FixtureMonologExtensionTestCase.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\MonologBundle\Tests\DependencyInjection;
1313

1414
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
15+
use Monolog\Handler\NoopHandler;
1516
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass;
1617
use Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension;
1718
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -191,9 +192,11 @@ public function testPsr3MessageProcessingDisabledOnNullHandler()
191192

192193
public function testHandlersV2()
193194
{
194-
$this->getContainer('handlers');
195+
$container = $this->getContainer('handlers');
195196

196-
$this->expectNotToPerformAssertions();
197+
$this->assertTrue($container->hasDefinition('monolog.handler.noop'));
198+
$this->assertSame(NoopHandler::class, $container->getDefinition('monolog.handler.noop')->getClass());
199+
$this->assertSame(['DEBUG', true], $container->getDefinition('monolog.handler.noop')->getArguments());
197200
}
198201

199202
public function testPsr3MessageProcessingDisabled()

0 commit comments

Comments
 (0)