SqliteCommandTest.php 490 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
{
Alexander Makarov committed
8 9 10 11 12
	protected function setUp()
	{
		$this->driverName = 'sqlite';
		parent::setUp();
	}
13

Alexander Makarov committed
14 15 16
	public function testAutoQuoting()
	{
		$db = $this->getConnection(false);
17

Alexander Makarov committed
18 19 20 21
		$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
}