mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
added unit tests for schema detection
fixed some issues with schema detection
This commit is contained in:
@ -47,14 +47,14 @@ class SqliteConnectionTest extends ConnectionTest
|
||||
$this->assertEquals('(column)', $connection->quoteColumnName('(column)'));
|
||||
}
|
||||
|
||||
public function testTransactionIsolation()
|
||||
{
|
||||
$connection = $this->getConnection(true);
|
||||
public function testTransactionIsolation()
|
||||
{
|
||||
$connection = $this->getConnection(true);
|
||||
|
||||
$transaction = $connection->beginTransaction(Transaction::READ_UNCOMMITTED);
|
||||
$transaction->rollBack();
|
||||
$transaction = $connection->beginTransaction(Transaction::READ_UNCOMMITTED);
|
||||
$transaction->rollBack();
|
||||
|
||||
$transaction = $connection->beginTransaction(Transaction::SERIALIZABLE);
|
||||
$transaction->rollBack();
|
||||
}
|
||||
$transaction = $connection->beginTransaction(Transaction::SERIALIZABLE);
|
||||
$transaction->rollBack();
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,23 @@ use yiiunit\framework\db\SchemaTest;
|
||||
class SqliteSchemaTest extends SchemaTest
|
||||
{
|
||||
protected $driverName = 'sqlite';
|
||||
|
||||
public function getExpectedColumns()
|
||||
{
|
||||
$columns = parent::getExpectedColumns();
|
||||
unset($columns['enum_col']);
|
||||
$columns['int_col']['dbType'] = 'integer';
|
||||
$columns['int_col']['size'] = null;
|
||||
$columns['int_col']['precision'] = null;
|
||||
$columns['int_col2']['dbType'] = 'integer';
|
||||
$columns['int_col2']['size'] = null;
|
||||
$columns['int_col2']['precision'] = null;
|
||||
$columns['bool_col']['type'] = 'boolean';
|
||||
$columns['bool_col']['phpType'] = 'boolean';
|
||||
$columns['bool_col2']['type'] = 'boolean';
|
||||
$columns['bool_col2']['phpType'] = 'boolean';
|
||||
$columns['bool_col2']['defaultValue'] = true;
|
||||
return $columns;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user