...
 
Commits (2)
    https://gitcode.net/yuencczzy/phpdemo/-/commit/cbe61e222e02df901c82025f5629aae5547f73a2 aaa 2024-03-28T17:47:58+08:00 yuenblue 8060790+yuenzzy@user.noreply.gitee.com https://gitcode.net/yuencczzy/phpdemo/-/commit/f4b5413b12a92fd6945570ccc990cbd4adb96be6 aaa 2024-03-28T17:58:41+08:00 yuenblue 8060790+yuenzzy@user.noreply.gitee.com
......@@ -51,6 +51,7 @@ class AppService extends Service
$log = $this->app->logger_sql;
$master=$master?$master:'default';
$log->warning("{$sql} Take {$runtime} By {$master}");
});
......
<?php
namespace common;
// 应用公共文件
class Bbb{
function say() {
return "hello common";
}
}
function Aaa() {
return "hello common";
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ use think\facade\Cache;
use think\facade\Config;
use think\facade\Db;
use think\facade\Event;
use common\Bbb;
use function PHPUnit\Framework\assertTrue;
class DemoTp6 extends TestCase{
......@@ -20,6 +21,12 @@ class DemoTp6 extends TestCase{
{
assertTrue(true);
}
function testCommon() {
$bb = new Bbb();
print $bb->say();
print \common\Aaa();
}
function testAa() {
// assertTrue(function_exists('env')) ;
......@@ -68,7 +75,7 @@ class DemoTp6 extends TestCase{
// assertTrue($aa);
$this->assertNotEmpty(true);
// $this->assertNotEmpty(true);
}
function testCache() {
Cache::get("");
......