Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | // ╔════════════════════════════════════════════════════════════╗ |
| 4 | // ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║ |
| 5 | // ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com> ║ |
| 6 | // ╚════════════════════════════════════════════════════════════╝ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | use Phexium\Plugin\SqlDriver\Adapter\SqliteDriver; |
| 11 | use Tests\Phexium\Integration\Support\PdoRegistry; |
| 12 | |
| 13 | // @codeCoverageIgnoreStart |
| 14 | require_once __DIR__.'/BaseSqlDriverTests.php'; |
| 15 | registerBaseSqlDriverTests(); |
| 16 | $dbName = null; |
| 17 | beforeAll(function (): void { |
| 18 | PdoRegistry::initializeSqlite(); |
| 19 | }); |
| 20 | afterAll(function (): void { |
| 21 | PdoRegistry::cleanupSqlite(); |
| 22 | }); |
| 23 | // @codeCoverageIgnoreEnd |
| 24 | |
| 25 | beforeEach(function (): void { |
| 26 | $this->pdo = PdoRegistry::getConnection(); |
| 27 | $this->pdo->beginTransaction(); |
| 28 | $this->driver = new SqliteDriver($this->pdo); |
| 29 | }); |
| 30 | |
| 31 | afterEach(function (): void { |
| 32 | $this->pdo->rollBack(); |
| 33 | }); |