You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
824 B
34 lines
824 B
10 years ago
|
<?php
|
||
8 years ago
|
|
||
10 years ago
|
namespace yiiunit\framework\db\oci;
|
||
|
|
||
9 years ago
|
use yii\db\Schema;
|
||
10 years ago
|
|
||
|
/**
|
||
|
* @group db
|
||
|
* @group oci
|
||
|
*/
|
||
8 years ago
|
class CommandTest extends \yiiunit\framework\db\CommandTest
|
||
10 years ago
|
{
|
||
|
protected $driverName = 'oci';
|
||
|
|
||
|
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);
|
||
|
}
|
||
10 years ago
|
|
||
|
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'));
|
||
|
}
|
||
10 years ago
|
}
|