Skip to content

Commit 625787f

Browse files
committed
Adds test for checking if monolog handler is registered.
1 parent 1557353 commit 625787f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/SentryBundleTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Sentry\Integration\ExceptionListenerIntegration;
88
use Sentry\Integration\IntegrationInterface;
99
use Sentry\Integration\RequestIntegration;
10+
use Sentry\Monolog\Handler;
1011
use Sentry\SentryBundle\Command\SentryTestCommand;
1112
use Sentry\SentryBundle\DependencyInjection\SentryExtension;
1213
use Sentry\SentryBundle\EventListener\ConsoleListener;
@@ -143,6 +144,13 @@ public function testIntegrationsListenersAreDisabledByDefault(): void
143144
$this->assertNull($hub->getIntegration(ExceptionListenerIntegration::class));
144145
}
145146

147+
public function testContainerHasMonologHandlerRegistered(): void
148+
{
149+
$container = $this->getContainer();
150+
151+
$this->assertTrue($container->hasDefinition(Handler::class));
152+
}
153+
146154
private function getContainer(array $configuration = []): ContainerBuilder
147155
{
148156
$containerBuilder = new ContainerBuilder();

0 commit comments

Comments
 (0)