Code Duplication    Length = 17-17 lines in 3 locations

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

@@ 914-930 (lines=17) @@
911
    /**
912
     * @group DBAL-1004
913
     */
914
    public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers()
915
    {
916
        $table1 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'))));
917
        $table2 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'), array('comment' => 'baz'))));
918
919
        $comparator = new Comparator();
920
921
        $tableDiff = $comparator->diffTable($table1, $table2);
922
923
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
924
        self::assertSame(
925
            array(
926
                'COMMENT ON COLUMN "foo"."bar" IS \'baz\'',
927
            ),
928
            $this->_platform->getAlterTableSQL($tableDiff)
929
        );
930
    }
931
932
    /**
933
     * {@inheritdoc}

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

@@ 671-687 (lines=17) @@
668
    /**
669
     * @group DBAL-1004
670
     */
671
    public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers()
672
    {
673
        $table1 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'))));
674
        $table2 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'), array('comment' => 'baz'))));
675
676
        $comparator = new Comparator();
677
678
        $tableDiff = $comparator->diffTable($table1, $table2);
679
680
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
681
        self::assertSame(
682
            array(
683
                'COMMENT ON COLUMN "foo"."bar" IS \'baz\'',
684
            ),
685
            $this->_platform->getAlterTableSQL($tableDiff)
686
        );
687
    }
688
689
    public function testQuotedTableNames()
690
    {

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

@@ 803-819 (lines=17) @@
800
    /**
801
     * @group DBAL-1004
802
     */
803
    public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers()
804
    {
805
        $table1 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'))));
806
        $table2 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'), array('comment' => 'baz'))));
807
808
        $comparator = new Comparator();
809
810
        $tableDiff = $comparator->diffTable($table1, $table2);
811
812
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
813
        self::assertSame(
814
            array(
815
                'COMMENT ON COLUMN "foo"."bar" IS \'baz\'',
816
            ),
817
            $this->_platform->getAlterTableSQL($tableDiff)
818
        );
819
    }
820
821
    /**
822
     * {@inheritdoc}