@@ -161,7 +161,7 @@ public function runCommands($cmds, $result)
161
161
$ cmd ['documents ' ][$ docIndex ] = $ doc ;
162
162
}
163
163
}
164
- $ collection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), $ collectionName) );
164
+ $ collection = new Collection ($ this ->manager , $ this ->getDatabaseName (), $ collectionName );
165
165
$ this ->commands [$ key ]($ collection , $ this ->fixTypes ($ cmd , true ));
166
166
$ this ->collections [$ collectionName ] = $ collection ;
167
167
}
@@ -175,20 +175,20 @@ public function initializeDatabases($data, $test)
175
175
$ collectionsToDrop = ['fs.files ' ,'fs.chunks ' ,'expected.files ' ,'expected.chunks ' ];
176
176
$ data = $ this ->fixTypes ($ data , true );
177
177
foreach ($ collectionsToDrop as $ collectionName ) {
178
- $ collection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), $ collectionName) );
178
+ $ collection = new Collection ($ this ->manager , $ this ->getDatabaseName (), $ collectionName );
179
179
$ collection ->drop ();
180
180
}
181
181
if (isset ($ data ['files ' ]) && count ($ data ['files ' ]) > 0 ) {
182
- $ filesCollection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), "fs.files " ) );
182
+ $ filesCollection = new Collection ($ this ->manager , $ this ->getDatabaseName (), "fs.files " );
183
183
$ filesCollection ->insertMany ($ data ['files ' ]);
184
- $ expectedFilesCollection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), "expected.files " ) );
184
+ $ expectedFilesCollection = new Collection ($ this ->manager , $ this ->getDatabaseName (), "expected.files " );
185
185
$ expectedFilesCollection ->insertMany ($ data ['files ' ]);
186
186
$ this ->collections ['expected.files ' ] = $ expectedFilesCollection ;
187
187
}
188
188
if (isset ($ data ['chunks ' ]) && count ($ data ['chunks ' ]) > 0 ) {
189
- $ chunksCollection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), "fs.chunks " ) );
189
+ $ chunksCollection = new Collection ($ this ->manager , $ this ->getDatabaseName (), "fs.chunks " );
190
190
$ chunksCollection ->insertMany ($ data ['chunks ' ]);
191
- $ expectedChunksCollection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), "expected.chunks " ) );
191
+ $ expectedChunksCollection = new Collection ($ this ->manager , $ this ->getDatabaseName (), "expected.chunks " );
192
192
$ expectedChunksCollection ->insertMany ($ data ['chunks ' ]);
193
193
$ this ->collections ['expected.chunks ' ] = $ expectedChunksCollection ;
194
194
@@ -197,7 +197,7 @@ public function initializeDatabases($data, $test)
197
197
foreach ($ test ['arrange ' ]['data ' ] as $ cmd ) {
198
198
foreach ($ cmd as $ key => $ value ) {
199
199
if (isset ($ this ->commands [$ key ])) {
200
- $ collection = new Collection ($ this ->manager , sprintf ( " %s.%s " , $ this ->getDatabaseName (), $ cmd [$ key ]) );
200
+ $ collection = new Collection ($ this ->manager , $ this ->getDatabaseName (), $ cmd [$ key ]);
201
201
$ this ->commands [$ key ]($ collection ,$ this ->fixTypes ($ cmd , true ));
202
202
}
203
203
}
0 commit comments