* Batch replacement of product test class.

This commit is contained in:
liyang
2024-04-26 13:58:43 +08:00
parent 2a12833b3d
commit 84374012d5
71 changed files with 72 additions and 72 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/action.unittest.class.php';
include dirname(__FILE__, 4) . '/file/test/file.class.php';
include dirname(__FILE__, 4) . '/file/test/lib/file.unittest.class.php';
su('admin');
zenData('action')->gen(2);
@@ -31,4 +31,4 @@ $file = new fileTest();
r($action->updateCommentTest($actionIDList[0], $commentList[0], $uidList[0])) && p('comment') && e('备注1'); // 测试更新action 1的备注, 备注被成功更新为备注1
r($action->updateCommentTest($actionIDList[1], $commentList[1], $uidList[1])) && p('comment') && e('备注2'); // 测试更新action 2的备注, 备注被成功更新为备注2
r($file->getByIdTest(1)) && p('objectType;objectID') && e('story;2'); //测试文件是否更新成功, 文件的objectType和objectID被更新为story和2
r($file->getByIdTest(1)) && p('objectType;objectID') && e('story;2'); //测试文件是否更新成功, 文件的objectType和objectID被更新为story和2
+1 -1
View File
@@ -38,7 +38,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->loadYaml('product')->gen(10);
@@ -21,7 +21,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('storystage')->gen(50);
+1 -1
View File
@@ -37,7 +37,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
@@ -11,7 +11,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
@@ -11,7 +11,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(5);
@@ -13,7 +13,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$product = $tester->loadModel('product');
@@ -14,7 +14,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(2);
+1 -1
View File
@@ -21,7 +21,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$productIdList = array(1, 2, 3, 4, 5, 1000001);
+1 -1
View File
@@ -31,7 +31,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
@@ -27,7 +27,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('module')->loadYaml('line')->gen(5);
zenData('product')->loadYaml('product')->gen(30);
+1 -1
View File
@@ -23,7 +23,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(1);
zenData('module')->gen(1);
+1 -1
View File
@@ -13,7 +13,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
zenData('doclib')->gen(10);
+1 -1
View File
@@ -24,7 +24,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('product')->gen(10);
@@ -14,7 +14,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(3);
+1 -1
View File
@@ -45,7 +45,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('product')->gen(10);
+1 -1
View File
@@ -64,7 +64,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->loadYaml('product')->gen(5);
@@ -13,7 +13,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->loadYaml('product')->gen(100);
zenData('story')->loadYaml('story')->gen(100);
@@ -23,7 +23,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('project')->loadYaml('execution')->gen(32);
$projectProduct = zenData('projectproduct');
+1 -1
View File
@@ -24,7 +24,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
@@ -14,7 +14,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$product = zenData('product');
$product->type->range('normal{5},branch{5},platform{5}');
@@ -22,7 +22,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
su('admin');
zenData('projectproduct')->loadYaml('projectproduct')->gen(30);
+1 -1
View File
@@ -34,7 +34,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
@@ -18,7 +18,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('project')->gen(90);
@@ -12,7 +12,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('project')->gen(20);
zenData('product')->gen(20);
@@ -21,7 +21,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('project')->gen(50);
zenData('user')->gen(5);
+1 -1
View File
@@ -21,7 +21,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('product')->gen(10);
@@ -12,7 +12,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
$project = zenData('project');
@@ -23,7 +23,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('user')->gen(50);
@@ -22,7 +22,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
su('admin');
@@ -16,7 +16,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$product = zenData('product');
$product->type->range('normal{2},branch,normal{2}');
@@ -22,7 +22,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('user')->gen(50);
+1 -1
View File
@@ -15,7 +15,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('productplan')->gen(500);
zenData('product')->gen(50);
@@ -17,7 +17,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('productplan')->loadYaml('productplan')->gen(30);
@@ -17,7 +17,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('productplan')->loadYaml('productplan')->gen(30);
@@ -14,7 +14,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$product = zenData('product');
$product->shadow->range('1');
+1 -1
View File
@@ -52,7 +52,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
+1 -1
View File
@@ -23,7 +23,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
@@ -19,7 +19,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$project = zenData('project');
$project->type->range('program{10},project{10},sprint{10}');
+1 -1
View File
@@ -33,7 +33,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('story')->gen(100);
+1 -1
View File
@@ -25,7 +25,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
su('admin');
zenData('product')->loadYaml('product')->gen(6);
+1 -1
View File
@@ -24,7 +24,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('module')->loadYaml('module')->gen(3);
+1 -1
View File
@@ -19,7 +19,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('build')->gen(50);
+1 -1
View File
@@ -22,7 +22,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
+1 -1
View File
@@ -49,7 +49,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
@@ -16,7 +16,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
+1 -1
View File
@@ -18,7 +18,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$story = zenData('story');
$story->estimate->range('1-10:2');
+1 -1
View File
@@ -36,7 +36,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
su('admin');
zenData('product')->gen(50);
+1 -1
View File
@@ -13,7 +13,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->loadYaml('product')->gen(5);
@@ -21,7 +21,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('project')->loadYaml('execution')->gen(32);
+1 -1
View File
@@ -17,7 +17,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('module')->gen(1);
+1 -1
View File
@@ -16,7 +16,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$doclib = zenData('doclib');
$doclib->addedBy->range('admin');
+1 -1
View File
@@ -26,7 +26,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(10);
@@ -22,7 +22,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('project')->gen(50);
@@ -31,7 +31,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('user')->gen(50);
+1 -1
View File
@@ -31,7 +31,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
@@ -15,7 +15,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('productplan')->loadYaml('productplan')->gen(30);
+1 -1
View File
@@ -25,7 +25,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('bug')->gen(50);
zenData('user')->gen(5);
@@ -11,7 +11,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
function initData()
{
@@ -24,7 +24,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$product = zenData('product')->loadYaml('product');
$product->type->range('normal{3},branch{3},platform{3}');
@@ -17,7 +17,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
function initData()
{
@@ -18,7 +18,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
function initData()
{
@@ -45,7 +45,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('product')->loadYaml('product')->gen(10);
+1 -1
View File
@@ -52,7 +52,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
@@ -12,7 +12,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('user')->gen(5);
zenData('project')->loadYaml('program')->gen(30);
+1 -1
View File
@@ -15,7 +15,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('case')->gen(50);
+1 -1
View File
@@ -12,7 +12,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('productplan')->loadYaml('productplan')->gen(100);
zenData('case')->loadYaml('case')->gen(100);
@@ -15,7 +15,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('case')->loadYaml('case')->gen(50);
+1 -1
View File
@@ -34,7 +34,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->gen(50);
zenData('story')->gen(50);
@@ -19,7 +19,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
zenData('product')->loadYaml('product')->gen(30);
zenData('story')->gen(50);
@@ -13,7 +13,7 @@ cid=0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/product.class.php';
include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
$products = zenData('product')->loadYaml('product');
$products->program->range('1-3');