comparison vendor/symfony/phpunit-bridge/bin/simple-phpunit @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
24 } else { 24 } else {
25 // PHPUnit 5.1 requires PHP 5.6+ 25 // PHPUnit 5.1 requires PHP 5.6+
26 $PHPUNIT_VERSION = '4.8'; 26 $PHPUNIT_VERSION = '4.8';
27 } 27 }
28 28
29 if ('composer.json' !== $COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json') { 29 $COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json';
30 putenv('COMPOSER=composer.json');
31 $_SERVER['COMPOSER'] = $_ENV['COMPOSER'] = 'composer.json';
32 }
33 30
34 $root = __DIR__; 31 $root = __DIR__;
35 while (!file_exists($root.'/'.$COMPOSER_JSON) || file_exists($root.'/DeprecationErrorHandler.php')) { 32 while (!file_exists($root.'/'.$COMPOSER_JSON) || file_exists($root.'/DeprecationErrorHandler.php')) {
36 if ($root === dirname($root)) { 33 if ($root === dirname($root)) {
37 break; 34 break;
43 $PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: ($root.'/vendor/bin/.phpunit'); 40 $PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: ($root.'/vendor/bin/.phpunit');
44 $PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php'; 41 $PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php';
45 $PHP = escapeshellarg($PHP); 42 $PHP = escapeshellarg($PHP);
46 if ('phpdbg' === PHP_SAPI) { 43 if ('phpdbg' === PHP_SAPI) {
47 $PHP .= ' -qrr'; 44 $PHP .= ' -qrr';
45 }
46
47 $defaultEnvs = array(
48 'COMPOSER' => 'composer.json',
49 'COMPOSER_VENDOR_DIR' => 'vendor',
50 'COMPOSER_BIN_DIR' => 'bin',
51 );
52
53 foreach ($defaultEnvs as $envName => $envValue) {
54 if ($envValue !== getenv($envName)) {
55 putenv("$envName=$envValue");
56 $_SERVER[$envName] = $_ENV[$envName] = $envValue;
57 }
48 } 58 }
49 59
50 $COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`)) 60 $COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
51 ? $PHP.' '.escapeshellarg($COMPOSER) 61 ? $PHP.' '.escapeshellarg($COMPOSER)
52 : 'composer'; 62 : 'composer';