本文整理汇总了PHP中PermissionsManager::clearInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP PermissionsManager::clearInstance方法的具体用法?PHP PermissionsManager::clearInstance怎么用?PHP PermissionsManager::clearInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PermissionsManager
的用法示例。
在下文中一共展示了PermissionsManager::clearInstance方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
parent::tearDown();
chdir($this->oldCwd);
system('rm -Rf ' . $this->admin_dir);
PermissionsManager::clearInstance();
}
示例2: tearDown
public function tearDown()
{
parent::tearDown();
$this->item_id++;
PermissionsManager::clearInstance();
ProjectManager::clearInstance();
Docman_ItemFactory::clearInstance($this->project->getID());
}
示例3: tearDown
public function tearDown()
{
$GLOBALS['Language'] = null;
PermissionsManager::clearInstance();
UserManager::clearInstance();
if (isset($this->old_ftp_incoming_dir)) {
$GLOBALS['ftp_incoming_dir'] = $this->old_ftp_incoming_dir;
} else {
unset($GLOBALS['ftp_incoming_dir']);
}
if (isset($this->old_ftp_frs_dir_prefix)) {
$GLOBALS['ftp_frs_dir_prefix'] = $this->old_ftp_frs_dir_prefix;
} else {
unset($GLOBALS['ftp_frs_dir_prefix']);
}
}
示例4: tearDown
public function tearDown()
{
PermissionsManager::clearInstance();
parent::tearDown();
}
示例5: itCanReturnUgroupIdsFromAnItemAndItsPermissionTypes
public function itCanReturnUgroupIdsFromAnItemAndItsPermissionTypes()
{
$object_id = 100;
$expected = array(Ugroup::PROJECT_MEMBERS);
$permissions_manager = mock('PermissionsManager');
stub($permissions_manager)->getAuthorizedUgroupIds($object_id, self::PERMISSIONS_TYPE)->returns($expected);
PermissionsManager::setInstance($permissions_manager);
$result = $this->ugroup_literalizer->getUgroupIds($object_id, self::PERMISSIONS_TYPE);
$this->assertEqual($expected, $result);
PermissionsManager::clearInstance();
}
示例6: tearDown
public function tearDown()
{
parent::tearDown();
unset($GLOBALS['sys_https_host']);
PermissionsManager::clearInstance();
}
示例7: tearDown
public function tearDown()
{
parent::tearDown();
chdir($this->cwd);
unset($GLOBALS['sys_data_dir']);
unset($GLOBALS['sys_https_host']);
PermissionsManager::clearInstance();
}
示例8: tearDown
public function tearDown()
{
PermissionsManager::clearInstance();
$this->xml_security->disableExternalLoadOfEntities();
parent::tearDown();
}
示例9: tearDown
public function tearDown()
{
try {
$sys_data_dir_arg = escapeshellarg($GLOBALS['sys_data_dir']);
$this->system_command->exec("sudo -u gitolite /usr/share/tuleap/plugins/git/bin/gl-delete-test-repository.sh {$sys_data_dir_arg}/gitolite/repositories/test_project");
} catch (Exception $e) {
//ignore errors
}
parent::tearDown();
$GLOBALS['sys_data_dir'] = $this->old_sys_data_dir;
ForgeConfig::restore();
PermissionsManager::clearInstance();
PluginManager::clearInstance();
UserManager::clearInstance();
unset($GLOBALS['tmp_dir']);
//revert gitolite driver setAdminPath in its builder
chdir($this->old_cwd);
}