From f54263935d02e8a3bf24240e6081280ce7a22622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 27 Oct 2023 14:50:45 +0200 Subject: [PATCH] Skip mongodb extension if extension is not installed (#1825) --- tests/Monolog/Handler/MongoDBHandlerTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Monolog/Handler/MongoDBHandlerTest.php b/tests/Monolog/Handler/MongoDBHandlerTest.php index 0a518c71..6f293f11 100644 --- a/tests/Monolog/Handler/MongoDBHandlerTest.php +++ b/tests/Monolog/Handler/MongoDBHandlerTest.php @@ -14,6 +14,9 @@ namespace Monolog\Handler; use MongoDB\Driver\Manager; use Monolog\Test\TestCase; +/** + * @requires extension mongodb + */ class MongoDBHandlerTest extends TestCase { public function testConstructorShouldThrowExceptionForInvalidMongo() @@ -56,10 +59,6 @@ class MongoDBHandlerTest extends TestCase public function testHandleWithDriverManager() { - if (!(class_exists('MongoDB\Driver\Manager'))) { - $this->markTestSkipped('ext-mongodb not installed'); - } - /* This can become a unit test once ManagerInterface can be mocked. * See: https://jira.mongodb.org/browse/PHPC-378 */