PostgreSQLCommandTest.php 506 Bytes
Newer Older
1 2 3 4 5
<?php
namespace yii\tests\unit\framework\db\pgsql;

use yiiunit\framework\db\CommandTest;

Carsten Brandt committed
6 7 8 9
/**
 * @group db
 * @group pgsql
 */
10 11 12
class PostgreSQLCommandTest extends CommandTest
{
    public $driverName = 'pgsql';
13 14 15 16 17 18 19 20 21

    public function testAutoQuoting()
    {
        $db = $this->getConnection(false);

        $sql = 'SELECT [[id]], [[t.name]] FROM {{customer}} t';
        $command = $db->createCommand($sql);
        $this->assertEquals('SELECT "id", "t"."name" FROM "customer" t', $command->sql);
    }
Carsten Brandt committed
22
}