DSP Project first push, date: 29/01/2026
This commit is contained in:
22
tests/bootstrap.php
Normal file
22
tests/bootstrap.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// tests/bootstrap.php
|
||||
// Minimal bootstrap for PHPUnit runs.
|
||||
|
||||
define('DSP_TEST_ROOT', dirname(__DIR__));
|
||||
|
||||
// Ensure Composer autoloader is available when dependencies are installed.
|
||||
$composerAutoload = DSP_TEST_ROOT . '/vendor/autoload.php';
|
||||
if (file_exists($composerAutoload)) {
|
||||
require_once $composerAutoload;
|
||||
}
|
||||
|
||||
// Fall back to a simple autoloader for project classes when running without Composer.
|
||||
spl_autoload_register(static function (string $class): void {
|
||||
$classPath = DSP_TEST_ROOT . '/classes/' . $class . '.php';
|
||||
if (is_file($classPath)) {
|
||||
require_once $classPath;
|
||||
}
|
||||
});
|
||||
|
||||
// Load helper functions that rely on global scope.
|
||||
require_once DSP_TEST_ROOT . '/includes/jupyter_helpers.php';
|
||||
Reference in New Issue
Block a user