Files
orderPRO/tests/bootstrap.php
Jacek Pyziak c489891d15 Add Orders and Order Status repositories with pagination and management features
- Implemented OrdersRepository for handling order data with pagination, filtering, and sorting capabilities.
- Added methods for retrieving order status options, quick stats, and detailed order information.
- Created OrderStatusRepository for managing order status groups and statuses, including CRUD operations and sorting.
- Introduced a bootstrap file for test environment setup and autoloading.
2026-03-03 01:32:28 +01:00

29 lines
759 B
PHP

<?php
declare(strict_types=1);
$basePath = dirname(__DIR__);
$autoload = $basePath . '/vendor/autoload.php';
if (is_file($autoload)) {
require $autoload;
} else {
spl_autoload_register(static function (string $class) use ($basePath): void {
$prefixes = [
'App\\' => $basePath . '/src/',
'Tests\\' => $basePath . '/tests/',
];
foreach ($prefixes as $prefix => $directory) {
if (!str_starts_with($class, $prefix)) {
continue;
}
$relative = substr($class, strlen($prefix));
$file = $directory . str_replace('\\', '/', $relative) . '.php';
if (is_file($file)) {
require $file;
}
}
});
}