1 Star 0 Fork 19

wo_糖水/phpkafka

forked from 龙之言/phpkafka 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
swoole-phpunit 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
宇润 提交于 2020-09-23 18:54 . Format code
#!/usr/bin/env php
<?php
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (version_compare('7.1.0', \PHP_VERSION, '>')) {
fwrite(
\STDERR,
sprintf(
'This version of PHPUnit is supported on PHP 7.1, PHP 7.2, and PHP 7.3.' . \PHP_EOL .
'You are using PHP %s (%s).' . \PHP_EOL,
\PHP_VERSION,
\PHP_BINARY
)
);
die(1);
}
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
foreach ([__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php'] as $file) {
if (file_exists($file)) {
define('PHPUNIT_COMPOSER_INSTALL', $file);
break;
}
}
unset($file);
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
fwrite(
\STDERR,
'You need to set up the project dependencies using Composer:' . \PHP_EOL . \PHP_EOL .
' composer install' . \PHP_EOL . \PHP_EOL .
'You can learn all about Composer on https://getcomposer.org/.' . \PHP_EOL
);
die(1);
}
$options = getopt('', ['prepend:']);
if (isset($options['prepend'])) {
require $options['prepend'];
}
unset($options);
require PHPUNIT_COMPOSER_INSTALL;
$code = 0;
Co::set(['hook_flags' => \SWOOLE_HOOK_ALL]);
Co\run(function () use (&$code) {
try {
$code = PHPUnit\TextUI\Command::main(false);
} catch (\Swoole\ExitException $e) {
$code = $e->getStatus();
}
});
exit($code);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hawkzp/phpkafka.git
[email protected]:hawkzp/phpkafka.git
hawkzp
phpkafka
phpkafka
master

搜索帮助