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

32 lines
1.3 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->getActionListByTypeAndID().
timeout=0
cid=14942
- 测试获取历史例句表中的id为1的记录的objectType和objectID字段的值是否正确,未能获取product字段所以product为空。
- 属性id @1
- 属性objectType @product
- 属性product @~~
- 属性objectID @1
- 测试获取项目表中的id为1的记录的project和type字段的值是否正确未能获取charter字段所以charter为空。
- 属性id @1
- 属性project @0
- 属性charter @~~
- 属性type @program
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/tao.class.php';
zenData('action')->gen(1);
zenData('project')->gen(1);
$actionTest = new actionTaoTest();
r($actionTest->fetchObjectInfoByID(TABLE_ACTION, 1, 'id,objectType,objectID')) && p('id,objectType,product,objectID') && e('1,product,~~,1'); //测试获取历史例句表中的id为1的记录的objectType和objectID字段的值是否正确,未能获取product字段所以product为空。
r($actionTest->fetchObjectInfoByID(TABLE_PROJECT, 1, 'id,project,type')) && p('id,project,charter,type') && e('1,0,~~,program'); //测试获取项目表中的id为1的记录的project和type字段的值是否正确未能获取charter字段所以charter为空。