From 63a5f83fbe8947e299888c89840a1d2a414c015f Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 23 Jun 2021 16:24:15 +0200 Subject: [PATCH] Skip test if DBAL is missing --- tests/DependencyInjection/Compiler/DbalTracingPassTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/DependencyInjection/Compiler/DbalTracingPassTest.php b/tests/DependencyInjection/Compiler/DbalTracingPassTest.php index 88d3ef106..ad32c7866 100644 --- a/tests/DependencyInjection/Compiler/DbalTracingPassTest.php +++ b/tests/DependencyInjection/Compiler/DbalTracingPassTest.php @@ -160,6 +160,10 @@ public function processDoesNothingIfConditionsForEnablingTracingAreMissingDataPr public function testContainerCompilationFailsIfConnectionDoesntExist(): void { + if (!self::isDoctrineDBALInstalled()) { + $this->markTestSkipped('This test requires the "doctrine/dbal" Composer package.'); + } + $container = $this->createContainerBuilder(); $container->setParameter('sentry.tracing.dbal.connections', ['missing']);