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

testInsertManyWithNonNumericKeys() public method

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