icingaweb2/test/php/bootstrap.php
Johannes Meyer 597cb5c94d tests: Use a real app for bootstrapping
Makes the tests less isolated, but streamlines
the autoloading and other stuff in a way that's
more maintainable than before.
2023-07-05 09:24:49 +02:00

15 lines
444 B
PHP

<?php
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
namespace Icinga\Test {
use Icinga\Application\Test;
$basePath = getenv('ICINGAWEB_BASEDIR') ?: realpath(dirname(__FILE__) . '/../..');
$libraryPath = getenv('ICINGAWEB_ICINGA_LIB') ?: ($basePath . '/library/Icinga');
$configPath = $basePath . '/test/config';
require $libraryPath . '/Application/Test.php';
Test::start($basePath, $configPath);
}