reset Console level in test

This commit is contained in:
crazywhalecc
2022-05-04 22:30:56 +08:00
parent d7728ebc25
commit 583b9d7cf7
2 changed files with 3 additions and 1 deletions

View File

@@ -354,7 +354,7 @@ class CQ
*/
public static function encode($msg, bool $is_content = false): string
{
$msg = str_replace(['&', '[', ']'], ['&', '[', ']'], $msg);
$msg = str_replace(['&', '[', ']'], ['&', '[', ']'], strval($msg));
if ($is_content) {
$msg = str_replace(',', ',', $msg);
}

View File

@@ -18,6 +18,7 @@ class TerminalTest extends TestCase
{
Console::setLevel(4);
Terminal::init();
Console::setLevel(0);
$this->expectOutputRegex('/Initializing\ Terminal/');
}
@@ -28,6 +29,7 @@ class TerminalTest extends TestCase
{
Console::setLevel(2);
Terminal::executeCommand('echo zhamao-framework');
Console::setLevel(0);
$this->expectOutputRegex('/zhamao-framework/');
}
}