Alcaeus\MongoDbAdapter\Tests\Mongo\MongoCollectionTest::testInsertMany PHP Method

testInsertMany() public method

public testInsertMany ( )
    public function testInsertMany()
    {
        $expected = ['ok' => 1.0, 'n' => 0, 'syncMillis' => 0, 'writtenTo' => null, 'err' => null];
        $documents = [['foo' => 'bar'], ['bar' => 'foo']];
        $this->assertArraySubset($expected, $this->getCollection()->batchInsert($documents));
        foreach ($documents as $document) {
            $this->assertInstanceOf('MongoId', $document['_id']);
        }
    }
MongoCollectionTest