diff --git a/module/common/test/model/setcompany.php b/module/common/test/model/setcompany.php new file mode 100755 index 0000000000..ceafd2ff1a --- /dev/null +++ b/module/common/test/model/setcompany.php @@ -0,0 +1,22 @@ +#!/usr/bin/env php +gen(1); + +/** + +title=测试 commonModel::setCompany(); +timeout=0 +cid=1 + +- 查看设置的公司名称 @易软天创网络科技有限公司 +- 查看设置的公司ID @1 + +*/ + +global $tester, $app; +$tester->loadModel('common')->setCompany(); + +r($app->company->name) && p('') && e('易软天创网络科技有限公司'); // 查看设置的公司名称 +r($app->company->id) && p('') && e('1'); // 查看设置的公司ID \ No newline at end of file diff --git a/module/common/test/model/setuserconfig.php b/module/common/test/model/setuserconfig.php index e5c0de43e9..37a5ea421e 100755 --- a/module/common/test/model/setuserconfig.php +++ b/module/common/test/model/setuserconfig.php @@ -4,7 +4,7 @@ include dirname(__FILE__, 5) . '/test/lib/init.php'; /** -title=测试 commonModel::diff(); +title=测试 commonModel::setUserConfig(); timeout=0 cid=1 @@ -24,4 +24,4 @@ global $app; r($app->user) && p('account,realname') && e('guest,guest'); // 没有登录的用户,账号和姓名都是guest su('admin'); -r($app->user) && p('account,realname') && e('admin,admin'); // 登录admin账号,账号和姓名都是admin \ No newline at end of file +r($app->user) && p('account,realname') && e('admin,admin'); // 登录admin账号,账号和姓名都是admin diff --git a/module/common/test/model/syncexecutionbychild.php b/module/common/test/model/syncexecutionbychild.php new file mode 100755 index 0000000000..358d7647f8 --- /dev/null +++ b/module/common/test/model/syncexecutionbychild.php @@ -0,0 +1,41 @@ +#!/usr/bin/env php +config('execution')->gen(400); + +/** + +title=测试 commonModel->syncExecutionByChild(); +timeout=0 +cid=1 + +- 执行$execution1属性status @wait +- 执行$execution2属性status @doing +- 执行$execution3属性status @wait +- 没有父阶段的数据不会被更新 @0 +- 没有父阶段的数据不会被更新 @0 +- 没有父阶段的数据不会被更新 @0 + +*/ + +global $tester; +$tester->loadModel('execution'); +$tester->loadModel('common'); + +$execution1 = $tester->execution->getById(301); +$execution2 = $tester->execution->getById(302); +$execution3 = $tester->execution->getById(303); + +r($execution1) && p('status') && e('wait'); +r($execution2) && p('status') && e('doing'); +r($execution3) && p('status') && e('wait'); + +$parentExectuion1 = $tester->common->syncExecutionByChild($execution1); +$parentExectuion2 = $tester->common->syncExecutionByChild($execution2); +$parentExectuion3 = $tester->common->syncExecutionByChild($execution3); + +r($parentExectuion1) && p('') && e('0'); // 没有父阶段的数据不会被更新 +r($parentExectuion2) && p('') && e('0'); // 没有父阶段的数据不会被更新 +r($parentExectuion3) && p('') && e('0'); // 没有父阶段的数据不会被更新 \ No newline at end of file