Skip to content
Snippets Groups Projects
Commit 349aa5ed authored by llaffont's avatar llaffont
Browse files

Ajout d'un lien pour retourner au portail depuis la page login côté accès pro.

parent 06d02d32
Branches
Tags
No related merge requests found
......@@ -3,7 +3,17 @@
<body>
<div class="main" align="center">
<div id='banniere'><img src="<?php echo URL_ADMIN_IMG?>portailbandeauafi.png" width="990" alt="bannière" /></div>
<div class="barre_nav"></div>
<div class="menu barre_nav">
<ul>
<li>
<?php
echo $this->tagImg(URL_ADMIN_IMG.'picto/profils_16.png');
echo $this->tagAnchor(['module' => 'opac', 'controller' => 'index', 'action' => 'index', 'id_profil' => 1],
$this->_('Retour au site'));
?>
</li>
</ul>
</div>
<div class="modules" style="width:100%">
<h1><?php echo $this->traduire($this->titre) ?></h1>
<?php echo $this->render($this->actionScript); ?>
......
......@@ -20,7 +20,7 @@
*/
require_once 'AdminAbstractControllerTestCase.php';
class AdminAuthControllerTest extends Admin_AbstractControllerTestCase {
class AdminAuthControllerNobodyLoggedTest extends Admin_AbstractControllerTestCase {
protected $_auth;
protected $_auth_db_adapter;
......@@ -41,6 +41,12 @@ class AdminAuthControllerTest extends Admin_AbstractControllerTestCase {
}
public function tearDown() {
ZendAfi_Auth::setInstance(null);
parent::tearDown();
}
/** @test */
public function withAuthenticationSuccessfullShouldRedirectToAdmin() {
$this->_auth
......@@ -63,6 +69,7 @@ class AdminAuthControllerTest extends Admin_AbstractControllerTestCase {
$this->assertNotRedirect('/admin/');
}
/** @test */
public function withNoUsernameShouldDisplayMessageEntrezVotreNom() {
$this->postDispatch('/admin/auth/login', []);
......@@ -70,9 +77,10 @@ class AdminAuthControllerTest extends Admin_AbstractControllerTestCase {
}
public function tearDown() {
ZendAfi_Auth::setInstance(null);
parent::tearDown();
/** @test */
public function withNoUserNameShouldContainsLinkToGoBackToProfilOne() {
$this->dispath('/admin/auth/login');
$this->assertXPathContentContains('//a[contains(@href, "'.BASE_URL.'/id_profil/1")]', 'Retour au site');
}
}
......
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