+ Move unit test from test directory to each module.

This commit is contained in:
zhouxin
2023-04-24 02:16:47 +00:00
parent 8b32e6592a
commit 4efea42989
1671 changed files with 83077 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . "/test/lib/init.php";
include dirname(__FILE__, 2) . '/task.class.php';
su('admin');
/**
title=测试taskModel->batchCreate();
cid=1
pid=1
测试正常的创建开发任务 >> 批量任务三
测试正常的创建开发任务 >> 『任务类型』不能为空。
*/
$executionID = '101';
$name = array('批量任务一','批量任务二','批量任务三');
$type = array('devel','test','design');
$normal_create = array('name' => $name, 'type' => $type);
$name = array('异常一','异常二','异常三');
$Exception_create = array('name' => $name);
$task = new taskTest();
r($task->batchCreateObject($normal_create, $executionID)) && p('name') && e('批量任务三'); // 测试正常的创建开发任务
r($task->batchCreateObject($Exception_create, $executionID)) && p('message:0') && e('『任务类型』不能为空。'); // 测试正常的创建开发任务