Driver specific QueryBuilderTest::testCommentColumn() - improved to use replaceQuotes()

This commit is contained in:
SilverFire - Dmitry Naumenko
2016-04-20 09:40:21 +03:00
parent 2478ba7b20
commit b08c82c5fe
3 changed files with 12 additions and 17 deletions

View File

@@ -100,11 +100,11 @@ class PostgreSQLQueryBuilderTest extends QueryBuilderTest
{
$qb = $this->getQueryBuilder();
$expected = "COMMENT ON COLUMN \"comment\".\"text\" IS 'This is my column.'";
$expected = "COMMENT ON COLUMN [[comment]].[[text]] IS 'This is my column.'";
$sql = $qb->addCommentOnColumn('comment', 'text', 'This is my column.');
$this->assertEquals($expected, $sql);
$expected = "COMMENT ON COLUMN \"comment\".\"text\" IS NULL";
$expected = "COMMENT ON COLUMN [[comment]].[[text]] IS NULL";
$sql = $qb->dropCommentFromColumn('comment', 'text');
$this->assertEquals($expected, $sql);
}
@@ -113,11 +113,11 @@ class PostgreSQLQueryBuilderTest extends QueryBuilderTest
{
$qb = $this->getQueryBuilder();
$expected = "COMMENT ON TABLE \"comment\" IS 'This is my table.'";
$expected = "COMMENT ON TABLE [[comment]] IS 'This is my table.'";
$sql = $qb->addCommentOnTable('comment', 'This is my table.');
$this->assertEquals($expected, $sql);
$expected = "COMMENT ON TABLE \"comment\" IS NULL";
$expected = "COMMENT ON TABLE [[comment]] IS NULL";
$sql = $qb->dropCommentFromTable('comment');
$this->assertEquals($expected, $sql);
}