+ Add unit test for pivotTao::getGroupsByDimensionAndPath.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
title=测试 pivotTao->getAllPivotByGroupID();
|
||||
cid=1
|
||||
@@ -9,7 +8,6 @@ pid=1
|
||||
获取groupID=60的所有透视表 >> 1027;1007
|
||||
获取groupID=100的所有透视表 >> 1002
|
||||
获取groupID=85的所有透视表 >> 1001
|
||||
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
title=测试 pivotTao->getGroupsByDimensionAndPath();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取dimensionID为1,path为,3的模块信息 >> 3,这是一个模块3
|
||||
测试获取dimensionID为2,path为,6的模块信息 >> 6,这是一个模块6
|
||||
测试获取dimensionID为3,path为,9的模块信息 >> 9,这是一个模块9
|
||||
*/
|
||||
|
||||
global $tester;
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/pivot.class.php';
|
||||
|
||||
zdTable('module')->config('module')->gen(9);
|
||||
|
||||
$pivot = new pivotTest();
|
||||
$dimensionIDList = array(1,2,3);
|
||||
$pathList = array(',3',',6',',9');
|
||||
|
||||
r($pivot->getGroupsByDimensionAndPath($dimensionIDList[0], $pathList[0])) && p('0:id,name') && e('3,这是一个模块3'); //测试获取dimensionID为1,path为,3的模块信息
|
||||
r($pivot->getGroupsByDimensionAndPath($dimensionIDList[1], $pathList[1])) && p('0:id,name') && e('6,这是一个模块6'); //测试获取dimensionID为2,path为,6的模块信息
|
||||
r($pivot->getGroupsByDimensionAndPath($dimensionIDList[2], $pathList[2])) && p('0:id,name') && e('9,这是一个模块9'); //测试获取dimensionID为3,path为,9的模块信息
|
||||
@@ -0,0 +1,7 @@
|
||||
title: table zt_module
|
||||
desc: "模块"
|
||||
author: Wang XuePeng
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: root
|
||||
range: 1{3},2{3},3{3}
|
||||
Reference in New Issue
Block a user