*autotest case.

This commit is contained in:
zhengrunyu
2022-01-18 15:42:44 +08:00
parent f7682bf7a2
commit aa79ce443c
26 changed files with 459 additions and 202 deletions
+9 -9
View File
@@ -2,13 +2,21 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
/**
title=测试 programModel::update($programID);
cid=1
pid=1
*/
class Tester
{
public function __construct($user)
{
global $tester;
su('admin');
su($user);
$this->program = $tester->loadModel('program');
}
@@ -62,14 +70,6 @@ class Tester
$t = new Tester('admin');
/**
title=测试 programModel::update($programID);
cid=1
pid=1
*/
r($t->updateProgram(10)) && p('0:new') && e('测试更新项目集十');// 更新id为10的项目集信息
r($t->updateProgram(10, 2)) && p('message[begin]:0') && e('『计划开始』不能为空。');// 当计划开始为空时更新项目集信息
r($t->updateProgram(10, 3)) && p('message[end]:0') && e('『计划完成』不能为空。');// 当计划完成为空时更新项目集信息