Skip to content

Commit 4146fac

Browse files
committed
Ensure database is dropped before asserting it doesn't exist
Versions of MongoDB before 3.0 create a database when dropping the collection of a database that doesn't exist (as is done by the setUp() method).
1 parent 82a44c5 commit 4146fac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Operation/DropDatabaseFunctionalTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function testDropNonexistentDatabase()
2727
{
2828
$server = $this->getPrimaryServer();
2929

30+
$operation = new DropDatabase($this->getDatabaseName());
31+
$operation->execute($server);
32+
3033
$this->assertDatabaseDoesNotExist($server, $this->getDatabaseName());
3134

3235
$operation = new DropDatabase($this->getDatabaseName());

0 commit comments

Comments
 (0)