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

testCreateIndexTwiceWithDifferentName() public method

    public function testCreateIndexTwiceWithDifferentName()
    {
        $this->getCollection()->createIndex(['foo' => 1], ['name' => 'test_index']);
        $expected = ['createdCollectionAutomatically' => false, 'numIndexesBefore' => 2, 'numIndexesAfter' => 2, 'note' => 'all indexes already exist', 'ok' => 1.0];
        $this->assertSame($expected, $this->getCollection()->createIndex(['foo' => 1], ['name' => 'index_test']));
    }
MongoCollectionTest