|
4 | 4 |
|
5 | 5 | namespace Yiisoft\Db\Sqlite\Tests; |
6 | 6 |
|
7 | | -use Yiisoft\Db\TestSupport\TestQuoterTrait; |
| 7 | +use Yiisoft\Db\Sqlite\Tests\Support\TestTrait; |
| 8 | +use Yiisoft\Db\Tests\AbstractQuoterTest; |
8 | 9 |
|
9 | 10 | /** |
10 | 11 | * @group sqlite |
| 12 | + * |
| 13 | + * @psalm-suppress PropertyNotSetInConstructor |
11 | 14 | */ |
12 | | -final class QuoterTest extends TestCase |
| 15 | +final class QuoterTest extends AbstractQuoterTest |
13 | 16 | { |
14 | | - use TestQuoterTrait; |
| 17 | + use TestTrait; |
15 | 18 |
|
16 | 19 | /** |
17 | | - * @return string[][] |
| 20 | + * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QuoterProvider::tableNameParts() |
18 | 21 | */ |
19 | | - public function simpleTableNamesProvider(): array |
| 22 | + public function testGetTableNameParts(string $tableName, string ...$expected): void |
20 | 23 | { |
21 | | - return [ |
22 | | - ['test', 'test', ], |
23 | | - ['te\'st', 'te\'st', ], |
24 | | - ['te"st', 'te"st', ], |
25 | | - ['current-table-name', 'current-table-name', ], |
26 | | - ['`current-table-name`', 'current-table-name', ], |
27 | | - ]; |
28 | | - } |
29 | | - |
30 | | - /** |
31 | | - * @return string[][] |
32 | | - */ |
33 | | - public function simpleColumnNamesProvider(): array |
34 | | - { |
35 | | - return [ |
36 | | - ['test', '`test`', 'test'], |
37 | | - ['`test`', '`test`', 'test'], |
38 | | - ['*', '*', '*'], |
39 | | - ]; |
40 | | - } |
41 | | - |
42 | | - /** |
43 | | - * @return string[][] |
44 | | - */ |
45 | | - public function columnNamesProvider(): array |
46 | | - { |
47 | | - return [ |
48 | | - ['*', '*'], |
49 | | - ['table.*', '`table`.*'], |
50 | | - ['`table`.*', '`table`.*'], |
51 | | - ['table.column', '`table`.`column`'], |
52 | | - ['`table`.column', '`table`.`column`'], |
53 | | - ['table.`column`', '`table`.`column`'], |
54 | | - ['`table`.`column`', '`table`.`column`'], |
55 | | - ]; |
| 24 | + parent::testGetTableNameParts($tableName, ...$expected); |
56 | 25 | } |
57 | 26 | } |
0 commit comments