forked from ezsystems/ezpublish-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
27 lines (22 loc) · 1.02 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* File containing the bootstrapping of eZ Publish API for unit test use.
*
* Setups class loading.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
// Get global config.php settings
if (!file_exists(__DIR__ . '/config.php')) {
if (!symlink(__DIR__ . '/config.php-DEVELOPMENT', __DIR__ . '/config.php')) {
throw new \RuntimeException('Could not symlink config.php-DEVELOPMENT to config.php. Copy config.php-DEVELOPMENT to config.php and customize it to your needs.');
}
}
if (!($settings = include(__DIR__ . '/config.php'))) {
throw new \RuntimeException('Could not read config.php. Copy config.php-DEVELOPMENT to config.php and customize it to your needs.');
}
// Class alias used for BC
// Enables old code which still extends non namespaced TestCase to work
class_alias('PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase');
require_once __DIR__ . '/vendor/autoload.php';