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

testDeleteIndexUsingIndexName() public method

    public function testDeleteIndexUsingIndexName()
    {
        $newCollection = $this->getCheckDatabase()->selectCollection('test');
        $newCollection->createIndex(['bar' => 1], ['name' => 'bar']);
        $expected = ['nIndexesWas' => 2, 'errmsg' => 'index not found with name [bar_1]', 'ok' => 0.0, 'code' => 27];
        $this->assertEquals($expected, $this->getCollection()->deleteIndex('bar'));
        $this->assertCount(2, iterator_to_array($newCollection->listIndexes()));
    }
MongoCollectionTest