Skip to content

Commit b779765

Browse files
[Lock] skip tests when ext-mongo is not installed
1 parent b0dbd4c commit b779765

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/Store/MongoDbStoreTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* @author Joe Bennett <[email protected]>
2424
*
25-
* @requires function \MongoDB\Client::__construct
25+
* @requires extension mongodb
2626
* @group integration
2727
*/
2828
class MongoDbStoreTest extends AbstractStoreTest
@@ -31,6 +31,10 @@ class MongoDbStoreTest extends AbstractStoreTest
3131

3232
public static function setupBeforeClass(): void
3333
{
34+
if (!class_exists(\MongoDB\Client::class)) {
35+
$this->markTestSkipped('The mongodb/mongodb package is required.');
36+
}
37+
3438
$client = self::getMongoClient();
3539
try {
3640
$client->listDatabases();

0 commit comments

Comments
 (0)