rename test folder

This commit is contained in:
sunxyw
2022-03-28 16:41:13 +08:00
parent 37b5d954e9
commit 700b854434
12 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace ZMTest\Testing;
use Module\Example\Hello;
use PHPUnit\Framework\TestCase;
use ZM\Config\ZMConfig;
use ZM\ConsoleApplication;
use ZM\Utils\ZMUtil;
class ModuleTest extends TestCase
{
protected function setUp(): void {
ZMConfig::setDirectory(realpath(__DIR__."/../Mock"));
set_coroutine_params([]);
(new ConsoleApplication('zhamao-test'))->initEnv();
require_once __DIR__ . '/../../../src/ZM/global_defines.php';
}
public function testCtx() {
$r = ZMUtil::getModInstance(Hello::class);
ob_start();
$r->randNum(["随机数", "1", "5"]);
$out = ob_get_clean();
$this->assertEquals("随机数是1\n", $out);
}
}