just testing the environment
Some checks failed
Tests / test (push) Has been cancelled

This commit is contained in:
tom.hempel
2026-05-20 07:10:08 +02:00
parent 2a11dfd0d1
commit 06fc134299
56 changed files with 1890 additions and 361 deletions

38
tests/bootstrap.php Normal file
View File

@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/../vendor/autoload.php';
define('QDB_TESTING', true);
$root = dirname(__DIR__);
$varUploads = __DIR__ . '/var/uploads';
if (!is_dir($varUploads)) {
mkdir($varUploads, 0755, true);
}
define('QDB_PATH', $varUploads . '/questionnaire_database');
define('QDB_LOCK', $varUploads . '/.qdb_lock');
define('QDB_SCHEMA', __DIR__ . '/fixtures/schema.sql');
putenv('QDB_MASTER_KEY=dGVzdC1tYXN0ZXIta2V5LXRoaXQtMzJieXRzIQ==');
if (!extension_loaded('pdo_sqlite')) {
$ini = php_ini_loaded_file() ?: '(unknown)';
fwrite(STDERR, <<<MSG
PHPUnit requires the pdo_sqlite PHP extension (encrypted SQLite database).
Enable it in your php.ini (loaded from: {$ini}):
extension=pdo_sqlite
extension=sqlite3
Then verify: php -r "print_r(PDO::getAvailableDrivers());"
See TESTING.md for details.
MSG);
exit(1);
}