Files
EasySoft-ZenTaoPMS/test/model/action/hideone.php
2022-08-09 14:11:38 +08:00

28 lines
803 B
PHP
Executable File

#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/action.class.php';
$db->switchDB();
su('admin');
/**
title=测试 actionModel->hideOne();
cid=1
pid=1
隐藏action 28 >> 2
隐藏action 87 >> 2
隐藏已隐藏action 9 >> 2
隐藏非删除action 1 >> 1
*/
$actionIDList = array('48', '87', '9', '1');
$action = new actionTest();
r($action->hideOneTest($actionIDList[0])) && p('extra') && e('2'); // 隐藏action 28
r($action->hideOneTest($actionIDList[1])) && p('extra') && e('2'); // 隐藏action 87
r($action->hideOneTest($actionIDList[2])) && p('extra') && e('2'); // 隐藏已隐藏action 9
r($action->hideOneTest($actionIDList[3])) && p('extra') && e('1'); // 隐藏非删除action 1
$db->restoreDB();