* Adjust unit test.
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/programplan.class.php';
|
||||
|
||||
zdTable('project')->config('project')->gen(13);
|
||||
zdTable('task')->config('task')->gen(13);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 programplanModel->computeProgress();
|
||||
timeout=0
|
||||
cid=1
|
||||
cid=0
|
||||
|
||||
*/
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/programplan.class.php';
|
||||
su('admin');
|
||||
|
||||
zdTable('project')->config('project')->gen(13);
|
||||
zdTable('task')->config('task')->gen(13);
|
||||
|
||||
$programplan = new programplanTest();
|
||||
|
||||
r($programplan->computeProgressTest('2', 'edit', false)) && p() && e('success'); // 测试参数=项目id直接continue
|
||||
r($programplan->computeProgressTest('1', 'edit', false)) && p() && e('fail'); // 测试参数=项目id直接continue
|
||||
r($programplan->computeProgressTest('2', 'edit', true)) && p() && e('success'); // 测试阶段status=suspended子阶段status=wait
|
||||
r($programplan->getByIdTest(2)) && p('status') && e('wait'); // 测试阶段status:suspended=>wait
|
||||
r($programplan->computeProgressTest('5', 'edit', true)) && p() && e('success'); // 测试阶段status=suspended子阶段status=closed
|
||||
|
||||
Reference in New Issue
Block a user