Files
EasySoft-ZenTaoPMS/test/model/user/getgroupsbyvisions.php
2022-03-17 13:40:02 +08:00

24 lines
973 B
PHP
Executable File
Raw 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(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
su('admin');
/**
title=测试 userModel::getGroupsByVisionsTest();
cid=1
pid=1
获取系统中所有研发界面分组的数量 >> 14
获取系统中所有迅捷界面分组的数量 >> 3
传空Visions返回空数组 >> 0
获取系统中所有用户分组的数量 >> 17
*/
$user = new userTest();
r(count($user->getGroupsByVisionsTest(array('rnd')))) && p() && e('14'); // 获取系统中所有研发界面分组的数量
r(count($user->getGroupsByVisionsTest(array('lite')))) && p() && e('3'); // 获取系统中所有迅捷界面分组的数量
r($user->getGroupsByVisionsTest(array())) && p() && e('0'); // 传空Visions返回空数组
r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量