Refactor core test runtime and simplify project documentation
This commit is contained in:
@@ -5,20 +5,19 @@ declare(strict_types=1);
|
||||
namespace Tests\Media;
|
||||
|
||||
use Netig\Netslim\Kernel\Persistence\Infrastructure\Migrator;
|
||||
use PDO;
|
||||
use PDOException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tests\Support\TestDatabaseFactory;
|
||||
use Tests\Support\TestRuntimeFactory;
|
||||
|
||||
final class MediaSchemaIntegrationTest extends TestCase
|
||||
{
|
||||
private PDO $db;
|
||||
private \PDO $db;
|
||||
|
||||
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);
|
||||
Migrator::run($this->db);
|
||||
|
||||
Reference in New Issue
Block a user