mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
reset Console level in test
This commit is contained in:
@@ -354,7 +354,7 @@ class CQ
|
|||||||
*/
|
*/
|
||||||
public static function encode($msg, bool $is_content = false): string
|
public static function encode($msg, bool $is_content = false): string
|
||||||
{
|
{
|
||||||
$msg = str_replace(['&', '[', ']'], ['&', '[', ']'], $msg);
|
$msg = str_replace(['&', '[', ']'], ['&', '[', ']'], strval($msg));
|
||||||
if ($is_content) {
|
if ($is_content) {
|
||||||
$msg = str_replace(',', ',', $msg);
|
$msg = str_replace(',', ',', $msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class TerminalTest extends TestCase
|
|||||||
{
|
{
|
||||||
Console::setLevel(4);
|
Console::setLevel(4);
|
||||||
Terminal::init();
|
Terminal::init();
|
||||||
|
Console::setLevel(0);
|
||||||
$this->expectOutputRegex('/Initializing\ Terminal/');
|
$this->expectOutputRegex('/Initializing\ Terminal/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ class TerminalTest extends TestCase
|
|||||||
{
|
{
|
||||||
Console::setLevel(2);
|
Console::setLevel(2);
|
||||||
Terminal::executeCommand('echo zhamao-framework');
|
Terminal::executeCommand('echo zhamao-framework');
|
||||||
|
Console::setLevel(0);
|
||||||
$this->expectOutputRegex('/zhamao-framework/');
|
$this->expectOutputRegex('/zhamao-framework/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user