Code Duplication    Length = 15-16 lines in 2 locations

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

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