Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
72c412d2
Commit
72c412d2
authored
Mar 17, 2016
by
j-licht
Committed by
Jeremy Mikola
Mar 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use correct Collection constructor args in GridFS classes
Fixes #135
parent
4fbd208d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
GridFSCollectionsWrapper.php
src/GridFS/GridFSCollectionsWrapper.php
+2
-2
FunctionalTestCase.php
tests/GridFS/FunctionalTestCase.php
+2
-2
No files found.
src/GridFS/GridFSCollectionsWrapper.php
View file @
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
(){
...
...
tests/GridFS/FunctionalTestCase.php
View file @
72c412d2
...
...
@@ -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
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment