znt/module/action/test/tao/gettaskrelated.php

37 lines
1.1 KiB
PHP
Executable file
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
declare(strict_types=1);
/**
title=测试 actionTao->getTaskRelated().
timeout=0
cid=14956
- 测试当objectType为task,objectID为1时返回的数据是否正确
- 第0条的1属性 @1
- 属性1 @11
- 属性2 @11
- 测试当objectType为task,objectID为3时返回的数据是否正确
- 第0条的1属性 @1
- 属性1 @13
- 属性2 @11
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/tao.class.php';
zenData('project')->loadYaml('execution')->gen(1);
zenData('task')->loadYaml('task')->gen(5);
zenData('story')->gen(10);
zenData('projectproduct')->gen(20);
$actionTest = new actionTaoTest();
$objectTypeList = array('task');
$objectIDList = array(1, 3);
r($actionTest->getTaskRelated($objectTypeList[0], $objectIDList[0])) && p('0:0;1;2', ';') && e('1;11;11'); //测试当objectType为task,objectID为1时返回的数据是否正确
r($actionTest->getTaskRelated($objectTypeList[0], $objectIDList[1])) && p('0:0;1;2', ';') && e('1;13;11'); //测试当objectType为task,objectID为3时返回的数据是否正确