|
@@ -3,6 +3,7 @@
|
|
|
namespace Alcaeus\MongoDbAdapter\Tests\Mongo;
|
|
namespace Alcaeus\MongoDbAdapter\Tests\Mongo;
|
|
|
|
|
|
|
|
use Alcaeus\MongoDbAdapter\Tests\TestCase;
|
|
use Alcaeus\MongoDbAdapter\Tests\TestCase;
|
|
|
|
|
+use Countable;
|
|
|
|
|
|
|
|
class MongoGridFSCursorTest extends TestCase
|
|
class MongoGridFSCursorTest extends TestCase
|
|
|
{
|
|
{
|
|
@@ -37,4 +38,16 @@ class MongoGridFSCursorTest extends TestCase
|
|
|
], $value->file);
|
|
], $value->file);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function testInterfaces()
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->skipTestIf(extension_loaded('mongo'));
|
|
|
|
|
+
|
|
|
|
|
+ $gridfs = $this->getGridFS();
|
|
|
|
|
+ $id = $gridfs->storeBytes('foo', ['filename' => 'foo.txt']);
|
|
|
|
|
+ $gridfs->storeBytes('bar', ['filename' => 'bar.txt']);
|
|
|
|
|
+
|
|
|
|
|
+ $cursor = $gridfs->find(['filename' => 'foo.txt']);
|
|
|
|
|
+ $this->assertInstanceOf(Countable::class, $cursor);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|