ソースを参照

Skip mongodb extension if extension is not installed (#1825)

Grégoire Pineau 2 年 前
コミット
f54263935d
1 ファイル変更3 行追加4 行削除
  1. 3 4
      tests/Monolog/Handler/MongoDBHandlerTest.php

+ 3 - 4
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
          */