* Refactor getServiceCount|countOldDomain.

This commit is contained in:
sunguangming
2023-12-27 10:17:48 +08:00
parent 7602d07a03
commit 23fd85dbe1
3 changed files with 51 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
zdTable('instance')->gen(5);
zdTable('space')->gen(5);
/**
title=instanceModel->countOldDomain();
timeout=0
cid=1
- 查看获取到的所有服务的数量 @1
- 查看获取到的所有服务的数量 @1
*/
global $tester;
$tester->loadModel('instance');
$oldDomain = $tester->instance->countOldDomain();
r($oldDomain) && p('') && e('5'); // 查看获取到的所有服务的数量
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
zdTable('instance')->gen(5);
zdTable('space')->gen(5);
/**
title=instanceModel->getServiceCount();
timeout=0
cid=1
- 查看获取到的所有服务的数量 @1
- 查看获取到的所有服务的数量 @1
*/
global $tester;
$tester->loadModel('instance');
su('admin');
$instance = $tester->instance->getServiceCount();
r($instance) && p('') && e('1'); // 查看获取到的所有服务的数量
su('user1');
$instance = $tester->instance->getServiceCount();
r($instance) && p('') && e('1'); // 查看获取到的所有服务的数量