znt/module/my/test/model/gettaskassignedbyme.php

32 lines
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
/**
title=测试 myModel::getTaskAssignedByMe();
timeout=0
cid=17302
- 步骤1空ID列表 @0
- 步骤2有效ID列表 @0
- 步骤3优先级排序 @0
- 步骤4项目名排序 @0
- 步骤5多个ID过滤 @0
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
zenData('task')->gen('10');
zenData('user')->gen('1');
su('admin');
$myTest = new myModelTest();
r($myTest->getTaskAssignedByMeTest(null, 'id_desc', array())) && p() && e('0'); // 步骤1空ID列表
r($myTest->getTaskAssignedByMeTest(null, 'id_desc', array(1,2,3))) && p() && e('0'); // 步骤2有效ID列表
r($myTest->getTaskAssignedByMeTest(null, 'pri_desc', array(1,2,3))) && p() && e('0'); // 步骤3优先级排序
r($myTest->getTaskAssignedByMeTest(null, 'projectName_desc', array(1,2,3))) && p() && e('0'); // 步骤4项目名排序
r($myTest->getTaskAssignedByMeTest(null, 'id_desc', array(1,2,3,4,5))) && p() && e('0'); // 步骤5多个ID过滤