24 lines
969 B
PHP
Executable File
24 lines
969 B
PHP
Executable File
#!/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::getGroupsByVisions();
|
|
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'); // 获取系统中所有用户分组的数量
|