* Fix dev module unit test bug.

This commit is contained in:
wangyuting
2023-12-29 15:37:44 +08:00
parent ef6fedfaaa
commit fac9435b38
4 changed files with 22 additions and 7 deletions
+6 -6
View File
@@ -10,13 +10,13 @@ title=测试 devModel::getAPIs();
cid=1
pid=1
获取todo模块api名字 >> create
获取product模块api名字 >> index
获取project模块api描述 >> Project create guide.
获取todo模块第一个函数名字 >> create
获取product模块第一个函数名字 >> index
获取project模块第一个函数描述 >> 创建项目引导。
*/
$dev = new devTest();
r($dev->getAPIsTest('todo')) && p('0:name') && e('create'); //获取todo模块api名字
r($dev->getAPIsTest('product')) && p('0:name') && e('index'); //获取product模块api名字
r($dev->getAPIsTest('project')) && p('0:desc') && e('Project create guide.'); //获取project模块api描述
r($dev->getAPIsTest('todo')) && p('0:name') && e('create'); //获取todo模块第一个函数名字
r($dev->getAPIsTest('product')) && p('0:name') && e('index'); //获取product模块第一个函数名字
r($dev->getAPIsTest('project')) && p('0:desc') && e('创建项目引导。'); //获取project模块第一个函数描述
@@ -14,6 +14,8 @@ $ztLang->key->range('productCommon,index,all');
$ztLang->value->range('1-3')->prefix('测试');
$ztLang->gen(3);
zdTable('config')->gen(0);
/**
title=测试 devModel::getCustomedLang();
@@ -29,6 +31,9 @@ pid=1
*/
global $config;
$config->custom->URSR = 1;
$failModule = 'module';
$realModule = 'my';
@@ -3,6 +3,8 @@
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/dev.class.php';
zdTable('config')->gen(0);
/**
title=测试 devModel::getOriginalLang();
@@ -18,6 +20,9 @@ pid=1
*/
global $config;
$config->custom->URSR = 1;
$failModule = 'module';
$realModule = 'program';
+6 -1
View File
@@ -3,6 +3,8 @@
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/dev.class.php';
zdTable('config')->gen(0);
/**
title=测试 devModel']']saveCustomedLang();
@@ -21,6 +23,9 @@ pid=1
*/
global $config;
$config->custom->URSR = 1;
$devTester = new devTest();
$_POST = array();
@@ -29,7 +34,7 @@ $_POST['common_projectCommon'] = '项目2';
$_POST['common_executionCommon'] = '迭代2';
$_POST['common_URCommon'] = '用需2';
$_POST['common_SRCommon'] = '软需2';
r($devTester->saveCustomedLangTest('common', 'common', '', 'zh-cn')) && p() && e("产品2|项目2|迭代2"); // 自定义公共语言项
r($devTester->saveCustomedLangTest('common', 'common', '', 'zh-cn')) && p() && e("产品2|项目2|迭代2|"); // 自定义公共语言项
$_POST = array();
$_POST['common_mainNav_my'] = '我的地盘';