znt/module/execution/test/model/getcancopyobjects.php

29 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
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
zenData('user')->gen(5);
su('admin');
zenData('team')->loadYaml('team')->gen(30);
zenData('project')->loadYaml('execution')->gen(30);
/**
title=测试executionModel->getCanCopyObjectsTest();
timeout=0
cid=16306
*/
$projectIDList = array(11, 60, 100);
$count = array(0, 1);
$executionTester = new executionModelTest();
r($executionTester->getCanCopyObjectsTest($projectIDList[0], $count[0])) && p('11') && e('敏捷项目11人'); // 敏捷项目数据查询
r($executionTester->getCanCopyObjectsTest($projectIDList[1], $count[0])) && p('60') && e('瀑布项目21人'); // 瀑布项目数据查询
r($executionTester->getCanCopyObjectsTest($projectIDList[2], $count[0])) && p('126') && e('看板301人'); // 看板项目数据查询
r($executionTester->getCanCopyObjectsTest($projectIDList[0], $count[1])) && p() && e('6'); // 敏捷项目数据统计
r($executionTester->getCanCopyObjectsTest($projectIDList[1], $count[1])) && p() && e('11'); // 瀑布项目数据统计
r($executionTester->getCanCopyObjectsTest($projectIDList[2], $count[1])) && p() && e('4'); // 看板项目数据统计