From 1273befdf6b47ae054fd4fa2e4ca4562122db7b7 Mon Sep 17 00:00:00 2001 From: Kevin Schroeder Date: Tue, 26 Dec 2017 21:11:38 -0600 Subject: [PATCH] Add a mechanism to bypass mongo functionality if it is not installed --- tests/Storage/MongoTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Storage/MongoTest.php b/tests/Storage/MongoTest.php index 24b0464..2776e6d 100644 --- a/tests/Storage/MongoTest.php +++ b/tests/Storage/MongoTest.php @@ -11,6 +11,14 @@ class MongoTest extends TestCase { + protected function setUp() + { + if (!extension_loaded('mongodb')) { + $this->markTestSkipped('Mongo extension not installed'); + } + parent::setUp(); + } + public function testGetOnNullReturnsNull() { $collection = $this->getMockBuilder(Collection::class)->disableOriginalConstructor()