Yaffs site version 1.1
[yaffs-website] / vendor / phpunit / phpunit / phpunit
1 #!/usr/bin/env php
2 <?php
3 /*
4  * This file is part of PHPUnit.
5  *
6  * (c) Sebastian Bergmann <sebastian@phpunit.de>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 if (version_compare('5.3.3', PHP_VERSION, '>')) {
13     fwrite(
14         STDERR,
15         sprintf(
16             'This version of PHPUnit is supported on PHP 5.3, PHP 5.4, PHP 5.5, and PHP 5.6.' . PHP_EOL .
17             'You are using PHP %s%s.' . PHP_EOL,
18             PHP_VERSION,
19             defined('PHP_BINARY') ? ' (' . PHP_BINARY . ')' : ''
20         )
21     );
22
23     die(1);
24 }
25
26 if (!ini_get('date.timezone')) {
27     ini_set('date.timezone', 'UTC');
28 }
29
30 foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
31     if (file_exists($file)) {
32         define('PHPUNIT_COMPOSER_INSTALL', $file);
33
34         break;
35     }
36 }
37
38 unset($file);
39
40 if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
41     fwrite(STDERR,
42         'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
43         '    composer install' . PHP_EOL . PHP_EOL .
44         'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
45     );
46
47     die(1);
48 }
49
50 require PHPUNIT_COMPOSER_INSTALL;
51
52 PHPUnit_TextUI_Command::main();