mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
refactor phpunit-swoole to phpunit-zm and move old test cases
This commit is contained in:
37
tests_old/ZM/Utils/TerminalTest.php
Normal file
37
tests_old/ZM/Utils/TerminalTest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\ZM\Utils;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Throwable;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Utils\Terminal;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class TerminalTest extends TestCase
|
||||
{
|
||||
public function testInit()
|
||||
{
|
||||
$this->markTestIncomplete('logger level change in need');
|
||||
Console::setLevel(4);
|
||||
Terminal::init();
|
||||
Console::setLevel(0);
|
||||
$this->expectOutputRegex('/Initializing\ Terminal/');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function testExecuteCommand()
|
||||
{
|
||||
$this->markTestIncomplete('logger level change in need');
|
||||
Console::setLevel(2);
|
||||
Terminal::executeCommand('echo zhamao-framework');
|
||||
Console::setLevel(0);
|
||||
$this->expectOutputRegex('/zhamao-framework/');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user