You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
606 B
PHP

<?php
declare(strict_types=1);
namespace Kartierung\Repository\ResolutionStrategy;
use PDO;
use PHPUnit\Framework\TestCase;
abstract class SqliteBaseCase extends TestCase
{
private PDO $pdo;
private $sqlitePath;
protected function setUp(): void
{
parent::setUp();
$this->sqlitePath = tempnam(sys_get_temp_dir(), 'kartierung.sqlite');
$this->pdo = new \PDO("sqlite:/$this->sqlitePath");
}
protected function tearDown(): void
{
unlink($this->sqlitePath);
}
protected function getPdo(): PDO
{
return $this->pdo;
}
}