2023-04-22 00:17:24 -04:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @license MIT
|
|
|
|
* Copyright 2022 Dustin Wilson, et al.
|
|
|
|
* See LICENSE and AUTHORS files for details
|
|
|
|
*/
|
|
|
|
|
|
|
|
$dir = ini_get('extension_dir');
|
|
|
|
$php = escapeshellarg(\PHP_BINARY);
|
|
|
|
$code = escapeshellarg(__DIR__ . '/lib');
|
|
|
|
|
|
|
|
|
|
|
|
array_shift($argv);
|
|
|
|
foreach ($argv as $k => $v) {
|
|
|
|
if (in_array($v, ['--coverage', '--coverage-html'])) {
|
|
|
|
$argv[$k] = '--coverage-html tests/coverage';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$cmd = [
|
|
|
|
$php,
|
|
|
|
'-d opcache.enable_cli=0',
|
|
|
|
];
|
|
|
|
|
|
|
|
if (!extension_loaded('xdebug')) {
|
|
|
|
$cmd[] = '-d zend_extension=xdebug.so';
|
|
|
|
}
|
|
|
|
|
|
|
|
$cmd = implode(' ', [
|
|
|
|
...$cmd,
|
|
|
|
'-d xdebug.mode=coverage,develop,trace',
|
|
|
|
escapeshellarg(__DIR__ . '/vendor/bin/phpunit'),
|
|
|
|
'--configuration tests/phpunit.xml',
|
2023-04-23 14:16:20 -04:00
|
|
|
...$argv,
|
|
|
|
'--display-deprecations'
|
2023-04-22 00:17:24 -04:00
|
|
|
]);
|
|
|
|
passthru($cmd);
|