AspireCloud/tests/bootstrap.php
Sarah Savage ea08a6024b Adding baseline, fixing some missing test paths
* Adding a baseline for PHPStan so the checks will pass even though
we have not implemented some logic yet
* Updated some of the tests and configuration that was left behind
in the old namespacing
2024-10-10 08:01:25 -04:00

36 lines
1,000 B
PHP

<?php
declare(strict_types=1);
// turn on all errors
use AspirePress\AspireCloud\Helpers\ContainerHelper;
use AspirePress\AspireCloud\Helpers\DbHelper;
use Laminas\ServiceManager\ServiceManager;
use Mezzio\Application;
use Mezzio\MiddlewareFactory;
error_reporting(E_ALL);
// autoloader
require dirname(__DIR__) . '/vendor/autoload.php';
/** @var ServiceManager $container */
$container = require __DIR__ . '/../config/container.php';
/** @var Application $app */
$app = $container->get(Application::class);
$factory = $container->get(MiddlewareFactory::class);
// Load Routes
(require 'config/routes.php')($app, $factory, $container);
$config = $container->get('config');
$dbSchema = DbHelper::DB_NAME;
$config['database']['schema'] = $dbSchema;
putenv("DB_SCHEMA={$dbSchema}");
$container->setAllowOverride(true);
$container->setService('config', $config);
$container->setAllowOverride(false);
ContainerHelper::registerContainer($container);