create() 공개 메소드

Create new document
public create ( string $query, array $options = [] ) : boolean
$query string
$options array
리턴 boolean
예제 #1
0
 public function testCreateNoConnectionException()
 {
     $db = new MongoDb(array('host' => '__invalid__', 'autoConnect' => false));
     $this->assertException('Could not connect to the database.', function () use($db) {
         $db->create(null);
     });
 }
 public function testCreateNoConnectionException()
 {
     $db = new MongoDb(array('host' => '__invalid__', 'autoConnect' => false));
     $this->expectException('Could not connect to the database.');
     $result = $db->create(null);
 }