Bootstrap.php 872 Bytes
Newer Older
LONGMAN's avatar
LONGMAN committed
1
<?php
2
/**
LONGMAN's avatar
LONGMAN committed
3 4 5 6 7 8 9
 * This file is part of the TelegramBot package.
 *
 * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
10

LONGMAN's avatar
LONGMAN committed
11
namespace Tests;
12

LONGMAN's avatar
LONGMAN committed
13 14 15 16 17 18 19 20 21 22
/*
 * Set error reporting to the max level.
 */
error_reporting(-1);

/*
 * Set UTC timezone.
 */
date_default_timezone_set('UTC');

23
$autoloader = __DIR__ . '/../vendor/autoload.php';
LONGMAN's avatar
LONGMAN committed
24

25
/*
LONGMAN's avatar
LONGMAN committed
26 27
 * Check that --dev composer installation was done
 */
28
if (!file_exists($autoloader)) {
LONGMAN's avatar
LONGMAN committed
29
    throw new \Exception(
LONGMAN's avatar
LONGMAN committed
30 31 32 33 34
        'Please run "php composer.phar install --dev" in root directory '
        . 'to setup unit test dependencies before running the tests'
    );
}

35 36
//Include the Composer autoloader
require_once $autoloader;
LONGMAN's avatar
LONGMAN committed
37 38 39 40

/*
 * Unset global variables that are no longer needed.
 */
41
unset($autoloader);