test: add base TestCase and bootstrap for in-memory SQLite

This commit is contained in:
kj
2026-09-05 12:33:20 -03:00
parent 7494ec5fda
commit dbbde42fe7
2 changed files with 77 additions and 0 deletions

16
tests/bootstrap.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
// Test bootstrap for the DuckBrain development harness.
// Run PHPUnit from the project root (autoload.php resolves config.php via cwd).
require_once __DIR__ . '/../vendor/autoload.php';
// Define DB constants BEFORE config.php so the test database wins over the
// real configuration (config.php's define() warnings are suppressed by @).
define('DB_TYPE', 'sqlite');
define('DB_HOST', 'localhost');
define('DB_NAME', ':memory:');
define('DB_USER', '');
define('DB_PASS', '');
@require_once __DIR__ . '/../autoload.php';