File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,19 @@ public function testDrop(): void
158
158
$ this ->assertCollectionCount ($ this ->getNamespace (), 0 );
159
159
}
160
160
161
+ public function testDropCollection (): void
162
+ {
163
+ $ bulkWrite = new BulkWrite ();
164
+ $ bulkWrite ->insert (['x ' => 1 ]);
165
+
166
+ $ writeResult = $ this ->manager ->executeBulkWrite ($ this ->getNamespace (), $ bulkWrite );
167
+ $ this ->assertEquals (1 , $ writeResult ->getInsertedCount ());
168
+
169
+ $ commandResult = $ this ->database ->dropCollection ($ this ->getCollectionName ());
170
+ $ this ->assertCommandSucceeded ($ commandResult );
171
+ $ this ->assertCollectionCount ($ this ->getNamespace (), 0 );
172
+ }
173
+
161
174
public function testGetSelectsCollectionAndInheritsOptions (): void
162
175
{
163
176
$ databaseOptions = ['writeConcern ' => new WriteConcern (WriteConcern::MAJORITY )];
You can’t perform that action at this time.
0 commit comments