#!/usr/bin/env php
<?php
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

if (!ini_get('date.timezone')) {
    ini_set('date.timezone', 'UTC');
}

if (file_exists('./vendor/phpunit/phpunit/phpunit') && file_exists('./vendor/autoload.php')) {
  echo "\n==== Redirecting to composer installed version in vendor/phpunit ====\n\n";
  define ('PHPUNIT_COMPOSER_INSTALL', realpath('./vendor/autoload.php'));
} else {
  define ('PHPUNIT_COMPOSER_INSTALL', stream_resolve_include_path('PHPUnit/Autoload.php'));
}

require PHPUNIT_COMPOSER_INSTALL;

PHPUnit_TextUI_Command::main();
