Skip to content

Commit f666176

Browse files
authored
Allow running the test-suite when mongo extension is not loaded (#737)
1 parent 9763452 commit f666176

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/DoctrineIntegration/ODM/DocumentManagerTypeInferenceTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
namespace PHPStan\DoctrineIntegration\ODM;
44

55
use PHPStan\Testing\TypeInferenceTestCase;
6+
use function extension_loaded;
67
use const PHP_VERSION_ID;
78

89
final class DocumentManagerTypeInferenceTest extends TypeInferenceTestCase
910
{
1011

1112
public function dataFileAsserts(): iterable
1213
{
14+
if (!extension_loaded('mongodb')) {
15+
self::markTestSkipped('MongoDB extension is not installed.');
16+
}
17+
1318
yield from $this->gatherAssertTypes(__DIR__ . '/data/documentManagerDynamicReturn.php');
1419
yield from $this->gatherAssertTypes(__DIR__ . '/data/documentRepositoryDynamicReturn.php');
1520
yield from $this->gatherAssertTypes(__DIR__ . '/data/documentManagerMergeReturn.php');

0 commit comments

Comments
 (0)