SqliteCommandTest.php 544 Bytes
Newer Older
1 2 3
<?php
namespace yiiunit\framework\db\sqlite;

Alexander Makarov committed
4 5 6
use yiiunit\framework\db\CommandTest;

class SqliteCommandTest extends CommandTest
7
{
Carsten Brandt committed
8
    protected function setUp()
9 10 11 12 13
    {
        $this->driverName = 'sqlite';
        parent::setUp();
    }

Carsten Brandt committed
14
    public function testAutoQuoting()
15 16 17 18 19 20 21
    {
        $db = $this->getConnection(false);

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