public function testCommandError() { $db = $this->getDatabase(); $expected = ['ok' => 0, 'errmsg' => 'listDatabases may only be run against the admin database.', 'code' => 13]; $this->assertEquals($expected, $db->command(['listDatabases' => 1])); }