Commit 03e9decb authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #139

parents 4fbd208d 72c412d2
......@@ -31,8 +31,8 @@ class GridFSCollectionsWrapper
*/
public function __construct(Manager $manager, $databaseName, $bucketName, array $collectionOptions = [])
{
$this->filesCollection = new Collection($manager, sprintf('%s.%s.files', $databaseName, $bucketName), $collectionOptions);
$this->chunksCollection = new Collection($manager, sprintf('%s.%s.chunks', $databaseName, $bucketName), $collectionOptions);
$this->filesCollection = new Collection($manager, $databaseName, sprintf('%s.files', $bucketName), $collectionOptions);
$this->chunksCollection = new Collection($manager, $databaseName, sprintf('%s.chunks', $bucketName), $collectionOptions);
}
public function dropCollections(){
......
......@@ -18,7 +18,7 @@ abstract class FunctionalTestCase extends BaseFunctionalTestCase
{
parent::setUp();
foreach(['fs.files', 'fs.chunks'] as $collection){
$col = new Collection($this->manager, sprintf("%s.%s",$this->getDatabaseName(), $collection));
$col = new Collection($this->manager, $this->getDatabaseName(), $collection);
$col->drop();
}
$this->bucket = new \MongoDB\GridFS\Bucket($this->manager, $this->getDatabaseName());
......@@ -28,7 +28,7 @@ abstract class FunctionalTestCase extends BaseFunctionalTestCase
public function tearDown()
{
foreach(['fs.files', 'fs.chunks'] as $collection){
$col = new Collection($this->manager, sprintf("%s.%s",$this->getDatabaseName(), $collection));
$col = new Collection($this->manager, $this->getDatabaseName(), $collection);
$col->drop();
}
if ($this->hasFailed()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment