znt/module/report/test/model/getusertesttasks.php

35 lines
1.5 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=测试 reportModel::getUserTestTasks();
timeout=0
cid=18171
- 测试步骤1正常情况下获取用户测试任务 @user3:2;user4:2;user7:2;user8:2;user11:1;user12:1;
- 测试步骤2验证用户3的测试任务数量属性user3 @2
- 测试步骤3验证用户4的测试任务数量属性user4 @2
- 测试步骤4验证用户7的测试任务数量属性user7 @2
- 测试步骤5验证用户8的测试任务数量属性user8 @2
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
$testtaskTable = zenData('testtask');
$testtaskTable->loadYaml('testtask_getusertesttasks', false, 2)->gen(20);
$userTable = zenData('user');
$userTable->loadYaml('user_getusertesttasks', false, 2)->gen(20);
su('admin');
$reportTest = new reportModelTest();
r($reportTest->getUserTestTasksTest()) && p() && e('user3:2;user4:2;user7:2;user8:2;user11:1;user12:1;'); // 测试步骤1正常情况下获取用户测试任务
r($reportTest->getUserTestTasksTest('array')) && p('user3') && e('2'); // 测试步骤2验证用户3的测试任务数量
r($reportTest->getUserTestTasksTest('array')) && p('user4') && e('2'); // 测试步骤3验证用户4的测试任务数量
r($reportTest->getUserTestTasksTest('array')) && p('user7') && e('2'); // 测试步骤4验证用户7的测试任务数量
r($reportTest->getUserTestTasksTest('array')) && p('user8') && e('2'); // 测试步骤5验证用户8的测试任务数量