public function testDBCommand() { $x = $this->object->command((object) array()); $this->assertEquals(0, strpos($x['errmsg'], "no such cmd"), json_encode($x)); $this->assertEquals((bool) $x['ok'], false); $created = $this->object->createCollection("system.profile", true, 5000); $this->object->command((object) array('profile' => 0)); $x = $this->object->command((object) array('profile' => 1)); $this->assertEquals($x['was'], 0, json_encode($x)); $this->assertEquals((bool) $x['ok'], true, json_encode($x)); }