diff --git a/tests/Provider/QuoterProvider.php b/tests/Provider/QuoterProvider.php index 49e35007..82eab650 100644 --- a/tests/Provider/QuoterProvider.php +++ b/tests/Provider/QuoterProvider.php @@ -9,14 +9,14 @@ final class QuoterProvider extends \Yiisoft\Db\Tests\Provider\QuoterProvider public static function tableNameParts(): array { return [ - ['', ''], - ['[]', '[]'], - ['animal', 'animal'], - ['dbo.animal', 'animal', 'dbo'], - ['[dbo].[animal]', '[animal]', '[dbo]'], - ['[other].[animal2]', '[animal2]', '[other]'], - ['other.[animal2]', '[animal2]', 'other'], - ['other.animal2', 'animal2', 'other'], + ['', ['name' => '']], + ['""', ['name' => '']], + ['animal', ['name' => 'animal']], + ['"animal"', ['name' => 'animal']], + ['dbo.animal', ['schemaName' => 'dbo', 'name' => 'animal']], + ['"dbo"."animal"', ['schemaName' => 'dbo', 'name' => 'animal']], + ['"dbo".animal', ['schemaName' => 'dbo', 'name' => 'animal']], + ['dbo."animal"', ['schemaName' => 'dbo', 'name' => 'animal']], ]; } } diff --git a/tests/QuoterTest.php b/tests/QuoterTest.php index 8c279015..2f375e3b 100644 --- a/tests/QuoterTest.php +++ b/tests/QuoterTest.php @@ -4,23 +4,21 @@ namespace Yiisoft\Db\Sqlite\Tests; +use PHPUnit\Framework\Attributes\DataProviderExternal; +use Yiisoft\Db\Sqlite\Tests\Provider\QuoterProvider; use Yiisoft\Db\Sqlite\Tests\Support\TestTrait; use Yiisoft\Db\Tests\AbstractQuoterTest; /** * @group sqlite - * - * @psalm-suppress PropertyNotSetInConstructor */ final class QuoterTest extends AbstractQuoterTest { use TestTrait; - /** - * @dataProvider \Yiisoft\Db\Sqlite\Tests\Provider\QuoterProvider::tableNameParts - */ - public function testGetTableNameParts(string $tableName, string ...$expected): void + #[DataProviderExternal(QuoterProvider::class, 'tableNameParts')] + public function testGetTableNameParts(string $tableName, array $expected): void { - parent::testGetTableNameParts($tableName, ...$expected); + parent::testGetTableNameParts($tableName, $expected); } }