mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 23:25:35 +08:00
add CommandInfoUtil tests
This commit is contained in:
@@ -9,7 +9,6 @@ use Throwable;
|
||||
use ZM\Annotation\CQ\CQCommand;
|
||||
use ZM\API\CQ;
|
||||
use ZM\Event\EventManager;
|
||||
use ZM\Utils\CommandInfoUtil;
|
||||
use ZM\Utils\DataProvider;
|
||||
use ZM\Utils\MessageUtil;
|
||||
|
||||
@@ -45,17 +44,6 @@ class MessageUtilTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function testGenerateCommandHelp(): void
|
||||
{
|
||||
EventManager::$events[CQCommand::class] = [];
|
||||
$cmd = new CQCommand('测试命令');
|
||||
$cmd->class = self::class;
|
||||
$cmd->method = __FUNCTION__;
|
||||
EventManager::addEvent(CQCommand::class, $cmd);
|
||||
$help = resolve(CommandInfoUtil::class)->getHelp(self::class . '@' . __FUNCTION__, true);
|
||||
$this->assertEquals('测试命令:作者很懒,啥也没说', $help);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerTestArrayToStr
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user