| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Module\Mex\Commands;
- use App\Module\Mex\Tests\OpenHandlerTest;
- use Illuminate\Console\Command;
- /**
- * 测试OpenHandler功能的命令
- */
- class TestOpenHandlerCommand extends Command
- {
- /**
- * 命令签名
- *
- * @var string
- */
- protected $signature = 'mex:test-open-handler';
- /**
- * 命令描述
- *
- * @var string
- */
- protected $description = '测试Mex模块OpenHandler功能';
- /**
- * 执行命令
- *
- * @return int
- */
- public function handle()
- {
- $this->info('开始测试Mex模块OpenHandler功能...');
-
- // 运行测试
- $success = OpenHandlerTest::runAll();
-
- if ($success) {
- $this->info('所有测试通过!');
- return Command::SUCCESS;
- } else {
- $this->error('部分测试失败!');
- return Command::FAILURE;
- }
- }
- }
|