| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Module\Game\Commands;
- use App\Module\Game\Tests\SkinSystemTest;
- use Illuminate\Console\Command;
- /**
- * 皮肤系统测试命令
- */
- class TestSkinSystemCommand extends Command
- {
- /**
- * 命令签名
- *
- * @var string
- */
- protected $signature = 'game:test-skin-system {--user-id=1 : 测试用户ID}';
- /**
- * 命令描述
- *
- * @var string
- */
- protected $description = '测试皮肤系统功能';
- /**
- * 执行命令
- *
- * @return int
- */
- public function handle(): int
- {
- $this->info('开始测试皮肤系统...');
-
- try {
- $test = new SkinSystemTest();
- $test->runAllTests();
-
- $this->info('皮肤系统测试完成!');
- return 0;
- } catch (\Exception $e) {
- $this->error('测试过程中发生错误: ' . $e->getMessage());
- return 1;
- }
- }
- }
|