Skip to content
Snippets Groups Projects
Commit 15fcaee3 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #64837 fix tests failures

parent 4539b824
1 merge request!2343Hotline#64837 probleme de parametrage de droits
Pipeline #2518 passed with stage
in 21 minutes and 21 seconds
......@@ -37,14 +37,12 @@ class ZendAfi_View_Helper_FonctionsAdmin extends ZendAfi_View_Helper_BaseHelper
$actions = [$this->_extended($extended_actions)];
if (!Class_Users::isCurrentUserAllowedToEditProfile($profile))
return '';
$actions = array_merge($actions,
[$this->_config(),
$this->_versions(),
$this->_add(),
$this->_delete()]);
if (Class_Users::isCurrentUserAllowedToEditProfile($profile))
$actions = array_merge($actions,
[$this->_config(),
$this->_versions(),
$this->_add(),
$this->_delete()]);
$html = trim(implode(' ', array_filter($actions)));
......
......@@ -188,6 +188,13 @@ class ZendAfi_View_Helper_Accueil_KiosqueCubeAsRedacteurWithCatalogueTest extend
'//a[contains(@href, "admin/catalogue/add/id_catalogue/89/id_module/3")]',
$this->_html);
}
/** @test */
public function linkToEditWidgetShouldNotBePresent() {
$this->assertNotXPath($this->_html,
'//a[contains(@href, "/admin/widget")]');
}
}
......
......@@ -58,7 +58,8 @@ class FonctionsAdminHelperTest extends ViewHelperTestCase {
'password' => 'password',
'id_site' => 1,
'role_level' => ZendAfi_Acl_AdminControllerRoles::ADMIN_BIB]));
$this->_content = $this->helper->fonctionsAdmin(0, false, null, [function() {return 'test';}]);
$this->_content = $this->helper->fonctionsAdmin();
$this->assertEquals('', $this->_content);
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment