tests/unit/TableMapperTest.php
/**
     * @test
     * @dataProvider providerForIndexes
     * @param array $indexData
     * @throws NotSupportedException
     */
@test
@dataProvider providerForIndexes
@param array $indexData
@throws NotSupportedException
@test @dataProvider providerForIndexes @param array $indexData @throws NotSupportedException
public function shouldSetProperIndexes(array $indexData): void
    {
        $indexes = [];
        foreach ($indexData as $indexDatum) {
            $indexes[] = new IndexConstraint($indexDatum);
        }
        $this->prepareSchemaMock(true, [], $indexes);
        foreach ($indexes as $index) {
            $structureIndex = $this->mapper->getStructureOf('abcdef')->getIndex($index->name);
            self::assertSame($index->name, $structureIndex->getName());
            self::assertSame($index->columnNames, $structureIndex->getColumns());
            self::assertSame($index->isUnique, $structureIndex->isUnique());
        }
    }
public function shouldSetProperIndexes ( array $ indexData ) : void { $ indexes = [ ] ; foreach ( $ indexData as $ indexDatum ) { $ indexes [ ] = new IndexConstraint ( $ indexDatum ) ; } $ this -> prepareSchemaMock ( true , [ ] , $ indexes ) ; foreach ( $ indexes as $ index ) { $ structureIndex = $ this -> mapper -> getStructureOf ( 'abcdef' ) -> getIndex ( $ index -> name ) ; self :: assertSame ( $ index -> name , $ structureIndex -> getName ( ) ) ; self :: assertSame ( $ index -> columnNames , $ structureIndex -> getColumns ( ) ) ; self :: assertSame ( $ index -> isUnique , $ structureIndex -> isUnique ( ) ) ; } }
@test
 @dataProvider providerForIndexes
 @param array $indexData
 @throws NotSupportedException
@test @dataProvider providerForIndexes @param array $indexData @throws NotSupportedException
/** @var IndexConstraint $index */