| @@ 682-698 (lines=17) @@ | ||
| 679 | /** |
|
| 680 | * @group DBAL-1004 |
|
| 681 | */ |
|
| 682 | public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers() |
|
| 683 | { |
|
| 684 | $table1 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer')))); |
|
| 685 | $table2 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'), array('comment' => 'baz')))); |
|
| 686 | ||
| 687 | $comparator = new Comparator(); |
|
| 688 | ||
| 689 | $tableDiff = $comparator->diffTable($table1, $table2); |
|
| 690 | ||
| 691 | self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff); |
|
| 692 | self::assertSame( |
|
| 693 | array( |
|
| 694 | 'COMMENT ON COLUMN "foo"."bar" IS \'baz\'', |
|
| 695 | ), |
|
| 696 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 697 | ); |
|
| 698 | } |
|
| 699 | ||
| 700 | public function testQuotedTableNames() |
|
| 701 | { |
|
| @@ 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} |
|
| @@ 814-830 (lines=17) @@ | ||
| 811 | /** |
|
| 812 | * @group DBAL-1004 |
|
| 813 | */ |
|
| 814 | public function testAltersTableColumnCommentWithExplicitlyQuotedIdentifiers() |
|
| 815 | { |
|
| 816 | $table1 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer')))); |
|
| 817 | $table2 = new Table('"foo"', array(new Column('"bar"', Type::getType('integer'), array('comment' => 'baz')))); |
|
| 818 | ||
| 819 | $comparator = new Comparator(); |
|
| 820 | ||
| 821 | $tableDiff = $comparator->diffTable($table1, $table2); |
|
| 822 | ||
| 823 | self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff); |
|
| 824 | self::assertSame( |
|
| 825 | array( |
|
| 826 | 'COMMENT ON COLUMN "foo"."bar" IS \'baz\'', |
|
| 827 | ), |
|
| 828 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 829 | ); |
|
| 830 | } |
|
| 831 | ||
| 832 | /** |
|
| 833 | * {@inheritdoc} |
|