Files
EasySoft-ZenTaoPMS/module/action/test/model/getrepeatobject.php
T

37 lines
1.7 KiB
PHP
Raw 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
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/action.class.php';
zdTable('action')->config('action')->gen(10);
zdTable('product')->config('product')->gen(3);
zdTable('project')->config('execution')->gen(9);
/**
title=测试 actionModel->getRepeatObjectTest();
cid=1
pid=1
测试actionID为1table为zt_product的情况 >> 2
测试actionID为3table为zt_product的情况 >> 2
测试actionID为5table为zt_product的情况 >> 4
测试actionID为7table为zt_product的情况 >> 6
*/
$action = new actionTest();
$actionIDList = array(1, 2, 3, 5, 6, 7, 8);
$tableList = array('zt_project', 'zt_product');
r($result = $action->getRepeatObjectTest($actionIDList[0], $tableList[1])) && p('id') && e('2'); //测试actionID为1table为zt_product的情况
r($result = $action->getRepeatObjectTest($actionIDList[1], $tableList[1])) && p('id') && e('1'); //测试actionID为1table为zt_product的情况
r($result = $action->getRepeatObjectTest($actionIDList[2], $tableList[0])) && p('id') && e('2'); //测试actionID为3table为zt_project的情况
r($result = $action->getRepeatObjectTest($actionIDList[3], $tableList[0])) && p('id') && e('4'); //测试actionID为5table为zt_project的情况
r($result = $action->getRepeatObjectTest($actionIDList[4], $tableList[0])) && p('id') && e('3'); //测试actionID为5table为zt_project的情况
r($result = $action->getRepeatObjectTest($actionIDList[5], $tableList[0])) && p('id') && e('3'); //测试actionID为7table为zt_project的情况
r($result = $action->getRepeatObjectTest($actionIDList[6], $tableList[0])) && p('id') && e('7'); //测试actionID为8table为zt_project的情况