Skip to content
Snippets Groups Projects
Commit 236c6a50 authored by gloas's avatar gloas
Browse files

Tests added to complete the coverage of INTERDIRE_ENREG_UTIL in auth/login

parent 633f660d
Branches
Tags
No related merge requests found
......@@ -405,6 +405,35 @@ class AuthControllerNobodyLoggedAndNoRegistrationTest extends AuthControllerNobo
class AuthControllerNobodyLoggedAndNoRegistrationOnLoginPageTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
$interdire_enregistrement = new Class_AdminVar();
$interdire_enregistrement
->setId('INTERDIRE_ENREG_UTIL')
->setValeur(1);
Class_AdminVar::getLoader()->cacheInstance($interdire_enregistrement);
$this->dispatch('/opac/auth/login');
}
/** @test **/
public function linkRegisterShouldNotBeDisplayInLoggingBox() {
$this->assertNotXPath('//div[@id="boite_login"]//a[contains(@href, "auth/register")]');
}
/** @test **/
public function linkRegisterShouldNotBeDisplayInPageAuthLogin() {
$this->assertNotXPath('//div[@id="fieldset-login_form"]//a[contains(@href, "auth/register")]');
}
}
class AuthControllerNobodyLoggedAndNoRegistrationAllowedAjaxLoginTest extends AuthControllerNobodyLoggedTestCase {
protected
......
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