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

testDeleteIndexes() public method

public testDeleteIndexes ( )
    public function testDeleteIndexes()
    {
        $newCollection = $this->getCheckDatabase()->selectCollection('test');
        $newCollection->createIndex(['bar' => 1]);
        $expected = ['nIndexesWas' => 2, 'msg' => 'non-_id indexes dropped for collection', 'ok' => 1.0];
        $this->assertSame($expected, $this->getcollection()->deleteIndexes());
        $this->assertCount(1, iterator_to_array($newCollection->listIndexes()));
        // ID index is present by default
    }
MongoCollectionTest