phpunit (1152B)
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 'This version of PHPUnit requires PHP 5.3.3; using the latest version of PHP is highly recommended.' . PHP_EOL 16 ); 17 18 die(1); 19 } 20 21 if (!ini_get('date.timezone')) { 22 ini_set('date.timezone', 'UTC'); 23 } 24 25 foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) { 26 if (file_exists($file)) { 27 define('PHPUNIT_COMPOSER_INSTALL', $file); 28 29 break; 30 } 31 } 32 33 unset($file); 34 35 if (!defined('PHPUNIT_COMPOSER_INSTALL')) { 36 fwrite(STDERR, 37 'You need to set up the project dependencies using the following commands:' . PHP_EOL . 38 'wget http://getcomposer.org/composer.phar' . PHP_EOL . 39 'php composer.phar install' . PHP_EOL 40 ); 41 42 die(1); 43 } 44 45 require PHPUNIT_COMPOSER_INSTALL; 46 47 PHPUnit_TextUI_Command::main();