delete() public method

Delete document
public delete ( string $query, array $options = [] ) : boolean
$query string
$options array
return boolean
Esempio n. 1
0
 public function testDeleteNoConnectionException()
 {
     $db = new MongoDb(array('host' => '__invalid__', 'autoConnect' => false));
     $this->assertException('Could not connect to the database.', function () use($db) {
         $db->delete(null);
     });
 }
 public function testDeleteNoConnectionException()
 {
     $db = new MongoDb(array('host' => '__invalid__', 'autoConnect' => false));
     $this->expectException('Could not connect to the database.');
     $result = $db->delete(null);
 }