Skip to content

Commit 2b2242b

Browse files
committed
PHPLIB-570: Do not inspect result doc when dropping nonexistent collection
1 parent a5e029d commit 2b2242b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Operation/DropCollectionFunctionalTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public function testDropNonexistentCollection()
5454
$operation = new DropCollection($this->getDatabaseName(), $this->getCollectionName());
5555
$commandResult = $operation->execute($this->getPrimaryServer());
5656

57+
/* Avoid inspecting the result document as mongos returns {ok:1.0},
58+
* which is inconsistent from the expected mongod response of {ok:0}. */
5759
$this->assertIsObject($commandResult);
58-
$this->assertObjectHasAttribute('ok', $commandResult);
59-
$this->assertEquals(0, $commandResult->ok);
6060
}
6161

6262
public function testSessionOption()

0 commit comments

Comments
 (0)