Code Duplication    Length = 12-16 lines in 2 locations

tests/Doctrine/Tests/DBAL/Schema/TableTest.php 2 locations

@@ 116-127 (lines=12) @@
113
        $table     = new Table('foo', $columns, [], []);
114
    }
115
116
    public function testCreateIndex() : void
117
    {
118
        $type    = Type::getType('integer');
119
        $columns = [new Column('foo', $type), new Column('bar', $type), new Column('baz', $type)];
120
        $table   = new Table('foo', $columns);
121
122
        $table->addIndex(['foo', 'bar'], 'foo_foo_bar_idx');
123
        $table->addUniqueIndex(['bar', 'baz'], 'foo_bar_baz_uniq');
124
125
        self::assertTrue($table->hasIndex('foo_foo_bar_idx'));
126
        self::assertTrue($table->hasIndex('foo_bar_baz_uniq'));
127
    }
128
129
    public function testIndexCaseInsensitive() : void
130
    {
@@ 129-144 (lines=16) @@
126
        self::assertTrue($table->hasIndex('foo_bar_baz_uniq'));
127
    }
128
129
    public function testIndexCaseInsensitive() : void
130
    {
131
        $type    = Type::getType('integer');
132
        $columns = [
133
            new Column('foo', $type),
134
            new Column('bar', $type),
135
            new Column('baz', $type),
136
        ];
137
        $table   = new Table('foo', $columns);
138
139
        $table->addIndex(['foo', 'bar', 'baz'], 'Foo_Idx');
140
141
        self::assertTrue($table->hasIndex('foo_idx'));
142
        self::assertTrue($table->hasIndex('Foo_Idx'));
143
        self::assertTrue($table->hasIndex('FOO_IDX'));
144
    }
145
146
    public function testAddIndexes() : void
147
    {