Code Duplication    Length = 13-13 lines in 2 locations

tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php 2 locations

@@ 262-274 (lines=13) @@
259
        );
260
    }
261
262
    public function testCreateTableWithFulltextIndex()
263
    {
264
        $table = new Table('fulltext_table');
265
        $table->addOption('engine', 'MyISAM');
266
        $table->addColumn('text', 'text');
267
        $table->addIndex(array('text'), 'fulltext_text');
268
269
        $index = $table->getIndex('fulltext_text');
270
        $index->addFlag('fulltext');
271
272
        $sql = $this->_platform->getCreateTableSQL($table);
273
        self::assertEquals(array('CREATE TABLE fulltext_table (text LONGTEXT NOT NULL, FULLTEXT INDEX fulltext_text (text)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = MyISAM'), $sql);
274
    }
275
276
    public function testCreateTableWithSpatialIndex()
277
    {
@@ 276-288 (lines=13) @@
273
        self::assertEquals(array('CREATE TABLE fulltext_table (text LONGTEXT NOT NULL, FULLTEXT INDEX fulltext_text (text)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = MyISAM'), $sql);
274
    }
275
276
    public function testCreateTableWithSpatialIndex()
277
    {
278
        $table = new Table('spatial_table');
279
        $table->addOption('engine', 'MyISAM');
280
        $table->addColumn('point', 'text'); // This should be a point type
281
        $table->addIndex(array('point'), 'spatial_text');
282
283
        $index = $table->getIndex('spatial_text');
284
        $index->addFlag('spatial');
285
286
        $sql = $this->_platform->getCreateTableSQL($table);
287
        self::assertEquals(array('CREATE TABLE spatial_table (point LONGTEXT NOT NULL, SPATIAL INDEX spatial_text (point)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = MyISAM'), $sql);
288
    }
289
290
    public function testClobTypeDeclarationSQL()
291
    {