Refactor core test runtime and simplify project documentation
This commit is contained in:
@@ -5,14 +5,15 @@ declare(strict_types=1);
|
||||
namespace Tests\Kernel;
|
||||
|
||||
use Netig\Netslim\Kernel\Persistence\Infrastructure\Provisioner;
|
||||
use PDO;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tests\Support\TestDatabaseFactory;
|
||||
use Tests\Support\TestRuntimeFactory;
|
||||
|
||||
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
|
||||
|
||||
final class ProvisionerTest extends TestCase
|
||||
{
|
||||
private PDO $db;
|
||||
private \PDO $db;
|
||||
|
||||
private string $lockPath;
|
||||
|
||||
@@ -20,13 +21,11 @@ final class ProvisionerTest extends TestCase
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->db = new PDO('sqlite::memory:', options: [
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
]);
|
||||
TestRuntimeFactory::resetRuntime();
|
||||
$this->db = TestDatabaseFactory::createInMemory();
|
||||
$this->db->sqliteCreateFunction('strip_tags', 'strip_tags', 1);
|
||||
|
||||
$this->lockPath = dirname(__DIR__, 2) . '/database/.provision.lock';
|
||||
$this->lockPath = TestRuntimeFactory::path('database/.provision.lock');
|
||||
@unlink($this->lockPath);
|
||||
|
||||
$this->envBackup = [
|
||||
|
||||
Reference in New Issue
Block a user