nimuli/tests/bootstrap.php

18 lines
491 B
PHP

<?php
// Force test env vars before anything else loads.
// Docker OS env overrides phpunit.xml <env> directives unless we set them here first.
putenv('APP_ENV=testing');
$_ENV['APP_ENV'] = 'testing';
$_SERVER['APP_ENV'] = 'testing';
putenv('DB_CONNECTION=sqlite');
$_ENV['DB_CONNECTION'] = 'sqlite';
$_SERVER['DB_CONNECTION'] = 'sqlite';
putenv('DB_DATABASE=:memory:');
$_ENV['DB_DATABASE'] = ':memory:';
$_SERVER['DB_DATABASE'] = ':memory:';
require __DIR__.'/../vendor/autoload.php';