SqliteCommandTest.php 528 Bytes
Newer Older
1 2 3 4 5 6
<?php

namespace yiiunit\framework\db\sqlite;

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

Carsten Brandt committed
13
    public function testAutoQuoting()
14 15 16 17 18 19 20
    {
        $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);
    }
21
}