Code Duplication    Length = 15-15 lines in 2 locations

tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php 1 location

@@ 573-587 (lines=15) @@
570
    /**
571
     * @group 2859
572
     */
573
    public function testGetDefaultValueDeclarationSQLForDateType() : void
574
    {
575
        $currentDateSql = $this->_platform->getCurrentDateSQL();
576
        foreach (['date', 'date_immutable'] as $type) {
577
            $field = [
578
                'type'    => Type::getType($type),
579
                'default' => $currentDateSql,
580
            ];
581
582
            self::assertSame(
583
                ' DEFAULT ' . $currentDateSql,
584
                $this->_platform->getDefaultValueDeclarationSQL($field)
585
            );
586
        }
587
    }
588
589
    /**
590
     * @group DBAL-45

tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php 1 location

@@ 1440-1454 (lines=15) @@
1437
    /**
1438
     * @group 2859
1439
     */
1440
    public function testGetDefaultValueDeclarationSQLForDateType() : void
1441
    {
1442
        $currentDateSql = $this->_platform->getCurrentDateSQL();
1443
        foreach (['date', 'date_immutable'] as $type) {
1444
            $field = [
1445
                'type'    => Type::getType($type),
1446
                'default' => $currentDateSql,
1447
            ];
1448
1449
            self::assertSame(
1450
                " DEFAULT '" . $currentDateSql . "'",
1451
                $this->_platform->getDefaultValueDeclarationSQL($field)
1452
            );
1453
        }
1454
    }
1455
}
1456