pastebin

Paste Search Dynamic
Recent pastes
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('7.1.0', php_version, '>')) {
  13.     fwrite(
  14.         STDERR,
  15.         sprintf(
  16.             'This version of PHPUnit is supported on PHP 7.1, PHP 7.2, and PHP 7.3.' . PHP_EOL .
  17.             'You are using PHP %s (%s).' . PHP_EOL,
  18.             php_version,
  19.             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(
  42.         STDERR,
  43.         'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
  44.         '    composer install' . PHP_EOL . PHP_EOL .
  45.         'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
  46.     );
  47.  
  48.     die(1);
  49. }
  50.  
  51. $options = getopt('', array('prepend:'));
  52.  
  53. if (isset($options['prepend'])) {
  54.     require $options['prepend'];
  55. }
  56.  
  57. unset($options);
  58.  
  59. require PHPUNIT_COMPOSER_INSTALL;
  60.  
  61. PHPUnitTextUICommand::main();
Parsed in 0.088 seconds