TestInit.php 596 Bytes
Newer Older
jwage's avatar
jwage committed
1
<?php
romanb's avatar
romanb committed
2 3 4 5
/*
 * This file bootstraps the test environment.
 */

6
error_reporting(E_ALL | E_STRICT);
7
date_default_timezone_set('UTC');
8

9 10
if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
    // dependencies were installed via composer - this is the main project
11
    require __DIR__ . '/../../../vendor/autoload.php';
12 13
} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) {
    // installed as a dependency in `vendor`
14
    require __DIR__ . '/../../../../../autoload.php';
15
} else {
16
    throw new Exception('Can\'t find autoload.php. Did you install dependencies via Composer?');
17
}