mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
rename test folder
This commit is contained in:
27
tests/ZM/Utils/TerminalTest.php
Normal file
27
tests/ZM/Utils/TerminalTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace ZM\Utils;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Store\LightCacheInside;
|
||||
use ZM\Store\ZMAtomic;
|
||||
|
||||
class TerminalTest extends TestCase
|
||||
{
|
||||
public function setUp(): void {
|
||||
}
|
||||
|
||||
public function testExecuteCommand() {
|
||||
ob_start();
|
||||
Terminal::executeCommand("logtest");
|
||||
$this->assertStringContainsString("debug msg", ob_get_clean());
|
||||
}
|
||||
|
||||
public function testBc() {
|
||||
ob_start();
|
||||
Terminal::executeCommand("bc ".base64_encode("echo 'hello';"));
|
||||
$this->assertStringContainsString("hello", ob_get_clean());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user