znt/module/pivot/test/tao/getgroupsbydimensionandpath.php

25 lines
1.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 pivotTao->getGroupsByDimensionAndPath();
cid=17443
pid=1
测试获取dimensionID为1path为,3的模块信息 >> 3,这是一个模块3
测试获取dimensionID为2path为,6的模块信息 >> 6,这是一个模块6
测试获取dimensionID为3path为,9的模块信息 >> 9,这是一个模块9
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/tao.class.php';
zenData('module')->loadYaml('module')->gen(9);
$pivot = new pivotTaoTest();
$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为1path为,3的模块信息
r($pivot->getGroupsByDimensionAndPath($dimensionIDList[1], $pathList[1])) && p('0:id,name') && e('6,这是一个模块6'); //测试获取dimensionID为2path为,6的模块信息
r($pivot->getGroupsByDimensionAndPath($dimensionIDList[2], $pathList[2])) && p('0:id,name') && e('9,这是一个模块9'); //测试获取dimensionID为3path为,9的模块信息