|
4 | 4 |
|
5 | 5 | namespace Yiisoft\Db\Sqlite\Tests; |
6 | 6 |
|
7 | | -use Yiisoft\Db\Sqlite\ColumnSchemaBuilder; |
8 | | -use Yiisoft\Db\Sqlite\Schema; |
9 | | -use Yiisoft\Db\TestSupport\TestColumnSchemaBuilderTrait; |
| 7 | +use Yiisoft\Db\Sqlite\Tests\Support\TestTrait; |
| 8 | +use Yiisoft\Db\Tests\Common\CommonColumnSchemaBuilderTest; |
10 | 9 |
|
11 | 10 | /** |
12 | 11 | * @group sqlite |
| 12 | + * |
| 13 | + * @psalm-suppress PropertyNotSetInConstructor |
13 | 14 | */ |
14 | | -final class ColumnSchemaBuilderTest extends TestCase |
| 15 | +final class ColumnSchemaBuilderTest extends CommonColumnSchemaBuilderTest |
15 | 16 | { |
16 | | - use TestColumnSchemaBuilderTrait; |
17 | | - |
18 | | - public function getColumnSchemaBuilder($type, $length = null): ColumnSchemaBuilder |
19 | | - { |
20 | | - return new ColumnSchemaBuilder($type, $length); |
21 | | - } |
22 | | - |
23 | | - public function typesProvider(): array |
24 | | - { |
25 | | - return [ |
26 | | - ['integer UNSIGNED', Schema::TYPE_INTEGER, null, [ |
27 | | - ['unsigned'], |
28 | | - ]], |
29 | | - ['integer(10) UNSIGNED', Schema::TYPE_INTEGER, 10, [ |
30 | | - ['unsigned'], |
31 | | - ]], |
32 | | - ['integer(10)', Schema::TYPE_INTEGER, 10, [ |
33 | | - ['comment', 'test'], |
34 | | - ]], |
35 | | - ]; |
36 | | - } |
| 17 | + use TestTrait; |
37 | 18 |
|
38 | 19 | /** |
39 | | - * @dataProvider typesProvider |
| 20 | + * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\ColumnSchemaBuilderProvider::types(); |
40 | 21 | */ |
41 | | - public function testCustomTypes(string $expected, string $type, ?int $length, mixed $calls): void |
| 22 | + public function testCustomTypes(string $expected, string $type, int|null $length, array $calls): void |
42 | 23 | { |
43 | 24 | $this->checkBuildString($expected, $type, $length, $calls); |
44 | 25 | } |
|
0 commit comments