Skip to content

Commit

Permalink
Add test to ensure MongoCommandCursor implements MongoCursorInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Nov 6, 2019
1 parent a5650c1 commit 1bfccc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Alcaeus/MongoDbAdapter/Mongo/MongoCommandCursorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Alcaeus\MongoDbAdapter\Tests\Mongo;

use MongoCursorInterface;
use MongoDB\Database;
use MongoDB\Driver\ReadPreference;
use Alcaeus\MongoDbAdapter\Tests\TestCase;
Expand Down Expand Up @@ -202,4 +203,12 @@ public function dataCommandAppliesCorrectReadPreference()
],
];
}

public function testInterfaces()
{
$this->prepareData();
$cursor = $this->getCollection()->aggregateCursor([['$match' => ['foo' => 'bar']]]);

$this->assertInstanceOf(MongoCursorInterface::class, $cursor);
}
}

0 comments on commit 1bfccc6

Please sign in to comment.