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

testBatchInsertContinuesOnError() public method

    public function testBatchInsertContinuesOnError()
    {
        $expected = ['ok' => 1.0, 'n' => 0, 'syncMillis' => 0, 'writtenTo' => null, 'err' => null];
        $documents = [8, 'b' => ['bar' => 'foo']];
        $this->assertArraySubset($expected, $this->getCollection()->batchInsert($documents, ['continueOnError' => true]));
        $newCollection = $this->getCheckDatabase()->selectCollection('test');
        $this->assertSame(1, $newCollection->count());
    }
MongoCollectionTest