Commit c257a955 authored by Jeremy Mikola's avatar Jeremy Mikola

assertCommandSucceeded() now accepts a result document

parent d070cf84
......@@ -27,9 +27,12 @@ abstract class FunctionalTestCase extends TestCase
$this->assertEquals($count, $document['n']);
}
protected function assertCommandSucceeded(Cursor $cursor)
protected function assertCommandSucceeded($document)
{
$document = current($cursor->toArray());
if (is_object($document)) {
$document = get_object_vars($document);
}
$this->assertArrayHasKey('ok', $document);
$this->assertEquals(1, $document['ok']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment