Code Duplication    Length = 17-17 lines in 3 locations

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

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

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
        $this->assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
924
        $this->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/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
        $this->assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
813
        $this->assertSame(
814
            array(
815
                'COMMENT ON COLUMN "foo"."bar" IS \'baz\'',
816
            ),
817
            $this->_platform->getAlterTableSQL($tableDiff)
818
        );
819
    }
820
821
    /**
822
     * {@inheritdoc}