From 1bfccc6aa95fe908a6c6fade246ab86f7aaa93d8 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 6 Nov 2019 19:24:50 +0100 Subject: [PATCH] Add test to ensure MongoCommandCursor implements MongoCursorInterface --- .../MongoDbAdapter/Mongo/MongoCommandCursorTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Alcaeus/MongoDbAdapter/Mongo/MongoCommandCursorTest.php b/tests/Alcaeus/MongoDbAdapter/Mongo/MongoCommandCursorTest.php index e5a8d5c3..bb510262 100644 --- a/tests/Alcaeus/MongoDbAdapter/Mongo/MongoCommandCursorTest.php +++ b/tests/Alcaeus/MongoDbAdapter/Mongo/MongoCommandCursorTest.php @@ -2,6 +2,7 @@ namespace Alcaeus\MongoDbAdapter\Tests\Mongo; +use MongoCursorInterface; use MongoDB\Database; use MongoDB\Driver\ReadPreference; use Alcaeus\MongoDbAdapter\Tests\TestCase; @@ -202,4 +203,12 @@ public function dataCommandAppliesCorrectReadPreference() ], ]; } + + public function testInterfaces() + { + $this->prepareData(); + $cursor = $this->getCollection()->aggregateCursor([['$match' => ['foo' => 'bar']]]); + + $this->assertInstanceOf(MongoCursorInterface::class, $cursor); + } }