Add testcase.
This commit is contained in:
@@ -287,7 +287,9 @@ class blockTest
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$objects = json_decode($objects);
|
||||
|
||||
return $objects->count;
|
||||
}
|
||||
|
||||
public function getProjectParamsTest()
|
||||
@@ -402,11 +404,11 @@ class blockTest
|
||||
|
||||
public function getQaStatisticParamsTest()
|
||||
{
|
||||
$objects = $this->objectModel->getQaStatisticParams();
|
||||
$object = $this->objectModel->getQaStatisticParams();
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
return json_decode($object);
|
||||
}
|
||||
|
||||
public function getRecentProjectParamsTest()
|
||||
@@ -574,7 +576,9 @@ class blockTest
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
$objects = json_decode($objects);
|
||||
|
||||
return $objects->type;
|
||||
}
|
||||
|
||||
public function getScrumOverviewParamsTest($module = '')
|
||||
|
||||
@@ -16,4 +16,5 @@ pid=1
|
||||
|
||||
$block = new blockTest();
|
||||
|
||||
r($block->getQaStatisticParamsTest()) && p() && e();
|
||||
r($block->getQaStatisticParamsTest()) && p('type:name') && e('类型'); //测试name
|
||||
r($block->getQaStatisticParamsTest()) && p('type:control') && e('select');//测试control
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/block.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 blockModel->getRecentProjectParams();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$block = new blockTest();
|
||||
|
||||
r($block->getRecentProjectParamsTest()) && p() && e();
|
||||
@@ -16,4 +16,4 @@ pid=1
|
||||
|
||||
$block = new blockTest();
|
||||
|
||||
r($block->getReleaseParamsTest()) && p() && e();
|
||||
r($block->getReleaseParamsTest()) && p('name,default,control') && e('数量,20,input'); //测试name
|
||||
|
||||
@@ -16,4 +16,8 @@ pid=1
|
||||
|
||||
$block = new blockTest();
|
||||
|
||||
r($block->getScrumListParamsTest()) && p() && e();
|
||||
r($block->getScrumListParamsTest()) && p('name,control') && e('类型,select'); //测试name和select
|
||||
r($block->getScrumListParamsTest()) && p('options:undone') && e('未完成'); //测试options
|
||||
r($block->getScrumListParamsTest()) && p('options:doing') && e('进行中'); //测试options
|
||||
r($block->getScrumListParamsTest()) && p('options:all') && e('全部'); //测试options
|
||||
r($block->getScrumListParamsTest()) && p('options:involved') && e('我参与'); //测试options
|
||||
|
||||
Reference in New Issue
Block a user