Code Duplication    Length = 15-16 lines in 2 locations

tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php 2 locations

@@ 435-449 (lines=15) @@
432
     * @dataProvider serialTypes
433
     * @group 2906
434
     */
435
    public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValue(string $type) : void
436
    {
437
        $tableName = "test_serial_type_$type";
438
439
        $table = new Schema\Table($tableName);
440
        $table->addColumn('id', $type, ['autoincrement' => true, 'notnull' => false]);
441
442
        $this->_sm->dropAndCreateTable($table);
443
444
        $columns = $this->_sm->listTableColumns($tableName);
445
446
        self::assertNull($columns['id']->getDefault());
447
    }
448
449
    /**
450
     * @dataProvider serialTypes
451
     * @group 2906
452
     */
@@ 453-468 (lines=16) @@
450
     * @dataProvider serialTypes
451
     * @group 2906
452
     */
453
    public function testAutoIncrementCreatesSerialDataTypesWithoutADefaultValueEvenWhenDefaultIsSet(string $type) : void
454
    {
455
        $tableName = "test_serial_type_with_default_$type";
456
457
        $table = new Schema\Table($tableName);
458
        $table->addColumn('id', $type, ['autoincrement' => true, 'notnull' => false, 'default' => 1]);
459
460
        $this->_sm->dropAndCreateTable($table);
461
462
        $columns = $this->_sm->listTableColumns($tableName);
463
464
        self::assertNull($columns['id']->getDefault());
465
    }
466
}
467
468
class MoneyType extends Type
469
{
470
471
    public function getName()