Skip to content

Commit 8caf809

Browse files
committed
minor #544 Test Noop handler (GromNaN)
This PR was merged into the 3.x branch. Discussion ---------- Test Noop handler | Q | A | ------------- | --- | Branch? | 3.x | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix #543 (comment) | License | MIT Commits ------- 3e3435a Test Noop handler
2 parents 804df4a + 3e3435a commit 8caf809

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 Monolog\Processor\PsrLogMessageProcessor;
1617
use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass;
1718
use Symfony\Bundle\MonologBundle\DependencyInjection\MonologExtension;
@@ -233,9 +234,11 @@ public function testHandlersV2()
233234
if (\Monolog\Logger::API < 2) {
234235
$this->markTestSkipped('This test requires Monolog v2 or above');
235236
}
236-
$this->getContainer('handlers');
237+
$container = $this->getContainer('handlers');
237238

238-
$this->expectNotToPerformAssertions();
239+
$this->assertTrue($container->hasDefinition('monolog.handler.noop'));
240+
$this->assertSame(NoopHandler::class, $container->getDefinition('monolog.handler.noop')->getClass());
241+
$this->assertSame(['DEBUG', true], $container->getDefinition('monolog.handler.noop')->getArguments());
239242
}
240243

241244
public function testPsr3MessageProcessingDisabled()

0 commit comments

Comments
 (0)