Skip to content

Commit

Permalink
Added tests for indexes and constraints (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdef committed Dec 18, 2022
1 parent 1fdc09a commit 5ea23a1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/SchemaTest.php
Expand Up @@ -222,4 +222,29 @@ function ($params) use ($expectedTableName, $expectedSchemaName) {
$schema = new Schema($mockDb, DbHelper::getSchemaCache(), 'dbo');
$schema->getTablePrimaryKey($tableName);
}

public function testWorkWithDefaultValueConstraint(): void
{
$this->expectException(NotSupportedException::class);
$this->expectExceptionMessage(
'Yiisoft\Db\Oracle\DDLQueryBuilder::addDefaultValue is not supported by Oracle.'
);

parent::testWorkWithDefaultValueConstraint();
}

public function withIndexDataProvider(): array
{
/*
* Bitmap indexes are not available for standard edition.
return array_merge(parent::withIndexDataProvider(), [
[
'indexType' => QueryBuilder::INDEX_BITMAP,
'indexMethod' => null,
'columnType' => 'varchar(16)',
],
]);
*/
return parent::withIndexDataProvider();
}
}

0 comments on commit 5ea23a1

Please sign in to comment.