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); } public function testLastInsertId() { $db = $this->getConnection(); $sql = 'INSERT INTO {{profile}}([[description]]) VALUES (\'non duplicate\')'; $command = $db->createCommand($sql); $command->execute(); $this->assertEquals(3, $db->getSchema()->getLastInsertID('profile_SEQ')); } public function batchInsertSqlProvider() { $data = parent::batchInsertSqlProvider(); $data['issue11242']['expected'] = 'INSERT INTO "type" ("int_col", "float_col", "char_col") VALUES (NULL, NULL, \'Kyiv {{city}}, Ukraine\')'; $data['wrongBehavior']['expected'] = 'INSERT INTO "type" ("type"."int_col", "float_col", "char_col") VALUES (\'\', \'\', \'Kyiv {{city}}, Ukraine\')'; return $data; } }