Skip to content

Commit

Permalink
Skip mongodb extension if extension is not installed (#1825)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx authored Oct 27, 2023
1 parent 8813064 commit f542639
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Monolog/Handler/MongoDBHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use MongoDB\Driver\Manager;
use Monolog\Test\TestCase;

/**
* @requires extension mongodb
*/
class MongoDBHandlerTest extends TestCase
{
public function testConstructorShouldThrowExceptionForInvalidMongo()
Expand Down Expand Up @@ -56,10 +59,6 @@ public function testHandleWithLibraryClient()

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
*/
Expand Down

0 comments on commit f542639

Please sign in to comment.