Newer
Older
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* AFI-OPAC 2.0 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AbstractControllerTestCase.php';
abstract class PortailWithOneLoginModuleTestCase extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_IntBib')
->whenCalled('findAllBy')
->answers([]);
$cfg_accueil = array('modules' => array(4 => array('division' => '4',
'id_module' => 4,
'type_module' => 'LOGIN',
'preferences' => array(
'identifiant' => 'Numéro de carte',
'mot_de_passe'=> 'Année de naissance',
'identifiant_exemple' => 'jj-mm-aaaa',
'mot_de_passe_exemple' => '1983',
'titre_connecte' => 'Vous êtes connecté(e)',
'lien_connexion' => 'please, log me',
'lien_mot_de_passe_oublie' => 'me rappelle plus'))),
'options' => array());
Class_Profil::getCurrentProfil()
->setBrowser('opac')
->setCfgAccueil(ZendAfi_Filters_Serialize::serialize($cfg_accueil));
}
}
class AuthControllerInviteLoggedTest extends PortailWithOneLoginModuleTestCase {
protected function _loginHook($account) {
$account->ROLE = "invite";
$account->ROLE_LEVEL = 1;
}
public function setUp() {
parent::setUp();
$this->dispatch('/opac/',true);
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
}
/** @test */
public function noLinkPretsShouldBePresent() {
$this->assertNotXPath('//div[@id="boite_login"]//a[contains(@href, "prets")]');
}
/** @test */
public function linkSeDeconnecterShouldBePresent() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "auth/logout")]');
}
}
class AuthControllerAbonneSIGBLoggedTest extends PortailWithOneLoginModuleTestCase {
protected function _loginHook($account) {
$account->ROLE = "abonne_sigb";
$account->ROLE_LEVEL = ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB;
$account->ID_USER = 5;
$account->ID_SITE = 1;
}
public function setUp() {
$this->emprunteur_patrick = Class_WebService_SIGB_Emprunteur::newInstance(5, 'patrick')
->empruntsAddAll(array(Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire()
->setDateRetour('23/12/2056'),
Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire()
->setDateRetour('3/2/2056'),
Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire()
->setDateRetour('23/1/1999')))
->reservationsAddAll(array(Class_WebService_SIGB_Reservation::newInstanceWithEmptyExemplaire()));
Class_Users::getLoader()->newInstanceWithId(5)
->setLogin('patrick')
->setIdabon(456)
->setFicheSigb(array('fiche' => $this->emprunteur_patrick));
parent::setUp();
$this->dispatch('/opac/');
}
/** @test */
public function linkPretsShouldBePresent() {
$this->assertXPathContentContains('//div[@id="boite_login"]//a[contains(@href, "prets")]', '3');
}
/** @test */
public function linkReservationsShouldBePresent() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "reservations")]');
}
/** @test */
public function linkSeDeconnecterShouldBePresent() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "auth/logout")]');
}
/** @test */
public function pageAuthLoginBarreNavShouldBeConnexion() {
$this->dispatch('/opac/auth/login',true);
$this->assertXPathContentContains('//div[@class="barre_nav"]','Connexion',$this->_response->getBody());
}
class AuthControllerAbonneSIGBLoggedLogoutTest extends PortailWithOneLoginModuleTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/opac/auth/logout');
}
/** @test */
public function answerShouldRedirectToRoot() {
$this->assertRedirectTo('/');
}
}
abstract class AuthControllerNobodyLoggedTestCase extends PortailWithOneLoginModuleTestCase {
protected function _loginHook($account) {
$account->ROLE = "";
$account->ROLE_LEVEL = 0;
$account->ID_USER = "";
$account->PSEUDO = "";
}
}

llaffont
committed
class AuthControllerNobodyLoggedAndRegistrationAllowedBoiteLoginTest extends AuthControllerNobodyLoggedTestCase {

llaffont
committed
parent::setUp();
Class_AdminVar::getLoader()
->newInstanceWithId('INTERDIRE_ENREG_UTIL')
$this->dispatch('/opac/',true);
/** @test */
public function submitButtonSeConnecterShouldBeDisplay(){
$this->assertXPath('//div[@id="boite_login"]//input[@type="submit"]',$this->_response->getBody());
}
/** @test */
public function titreDelaBoiteShouldBeSeConnecter(){
$this->assertXPathContentContains('//h1','Se connecter');
$this->assertXPath('//div[@id="boite_login"]//a[contains(@onclick,"submit")]');
$this->assertXPathContentContains('//div[@id="boite_login"]//a[contains(@onclick, "submit")]',

llaffont
committed
'please, log me');
}
public function testLinkLostPassword() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "auth/lostpass")]');
$this->assertXPathContentContains('//div[@id="boite_login"]//tr/td[@colspan="2"]/a[contains(@href, "auth/lostpass")]',

llaffont
committed
'me rappelle plus');
}
public function testLinkSenregistrer() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "auth/register")]');
$this->assertXPathContentContains('//div[@id="boite_login"]//a[contains(@href, "auth/register")]', "S'enregistrer");
}
public function testCanAccessRegisterPage() {

llaffont
committed
$this->bootstrap();
$this->dispatch('auth/register', true);
$this->assertAction('register');
$this->assertController('auth');
$this->assertNotRedirect('/');
}

llaffont
committed
/** @test */
public function inputIdentifiantShouldHavePlaceHolderJJ_MM_AAAA() {
$this->assertXPath('//input[@name="username"][@placeholder="jj-mm-aaaa"]');
}
/** @test */
public function inputPasswordShouldHavePlaceHolder1983() {
$this->assertXPath('//input[@name="password"][@placeholder="1983"]');
}
/** @test */
function headShouldContainsAbonnesJS() {
$this->assertXPath('//head//script[contains(@src,"public/opac/js/abonne.js")]', $this->_response->getBody());
}
/** @test */
function headShouldContainsAdminCommonJS() {
$this->assertXPath('//head//script[contains(@src,"public/admin/js/common.js")]');
}
/** @test */
function headShouldContainsJQuery() {
$this->assertXPath('//head//script[contains(@src, "jquery")]');
}
}

llaffont
committed
class AuthControllerNobodyLoggedAndRegistrationAllowedAjaxLoginTest extends AuthControllerNobodyLoggedTestCase {

llaffont
committed
public function setUp() {
parent::setUp();
Class_AdminVar::getLoader()
->newInstanceWithId('INTERDIRE_ENREG_UTIL')
->setValeur(0);
$this->dispatch('/opac/auth/popup-login', true);
$this->_xpath = new Storm_Test_XPath();
$this->_json = json_decode($this->_response->getBody());

llaffont
committed
}
public function testLinkLostPassword() {
$this->_xpath->assertXPath($this->_json->content,
'//div//a[contains(@onclick, "getUsername")]');

llaffont
committed
}
public function testLinkSenregistrer() {
$this->_xpath->assertXPath($this->_json->content,
'//div//a[contains(@href, "auth/register")]');
$this->_xpath->assertXPathContentContains(
$this->_json->content,
'//div//a[contains(@href, "auth/register")]',
"S'enregistrer");

llaffont
committed
}
}
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
class AuthControllerNobodyLoggedAndNoRegistrationTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
$interdire_enregistrement = new Class_AdminVar();
$interdire_enregistrement
->setId('INTERDIRE_ENREG_UTIL')
->setValeur(1);
Class_AdminVar::getLoader()->cacheInstance($interdire_enregistrement);
parent::setUp();
$this->dispatch('/opac/');
}
public function testLinkSenregistrerNotHere() {
$this->assertNotXPath('//div[@id="boite_login"]//a[contains(@href, "auth/register")]');
}
public function testCannotAccessRegisterPage() {
$this->dispatch('auth/register');
$this->assertRedirect('/');
}
}

llaffont
committed
class AuthControllerNobodyLoggedAndNoRegistrationAllowedAjaxLoginTest extends AuthControllerNobodyLoggedTestCase {

llaffont
committed
public function setUp() {
parent::setUp();
Class_AdminVar::getLoader()
->newInstanceWithId('INTERDIRE_ENREG_UTIL')
->setValeur(1);
$this->dispatch('/opac/auth/popup-login', true);
$this->_xpath = new Storm_Test_XPath();
$this->_json = json_decode($this->_response->getBody());

llaffont
committed
}
public function testLinkLostPassword() {
$this->_xpath->assertXPath($this->_json->content,
'//div//a[contains(@onclick, "getUsername")]');

llaffont
committed
}
public function testNoLinkSenregistrer() {
$this->_xpath->assertNotXPath($this->_json->content,
'//div//a[contains(@href, "auth/register")]');

llaffont
committed
}
class AuthControllerNobodyLoggedTest extends PortailWithOneLoginModuleTestCase {
public function setUp() {
parent::setUp();
ZendAfi_Auth::getInstance()->clearIdentity();
}
/**
* @group integration
* @test
*/
public function pageShouldBeHtml5Valid() {
$this->assertHTML5($this->_response->getBody());
}

llaffont
committed
/** @test */
public function pageShouldNotContainsRedirectInput() {
$this->assertNotXPath('//input[@name="redirect"]');
}
/** @test */
public function withRedirectParamPageShouldContainsRedirectInput() {
$this->bootstrap();
$this->dispatch('/opac/auth/login/redirect/'.urlencode('/opac/paniers'));
$this->assertXPath('//input[@name="redirect"][@value="/opac/paniers"]');
}
/** @test */
public function pageShouldNotContainsAjoutPanierInput() {
$this->assertNotXPath('//input[@name="ajoutPanier"]');
}
class AuthControllerNumilogConnectedUserDeconnexionTest extends PortailWithOneLoginModuleTestCase {

efalcy
committed
public function setUp() {
parent::setUp();
$this->dispatch('/opac/auth/login?service=http://numilog?deconnexion=ok', true);

efalcy
committed
}
/**
* @test
*/
public function pageShouldBeRedirectedToHome() {

efalcy
committed
}
}
class AuthControllerNoLoggedTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
}
/** @test */
public function pageAuthLoginWithServiceShouldIncludeHiddenService() {
$this->dispatch('/opac/auth/login?service=http://monurlservice',true);
$this->assertXPath('//input[@type="hidden"][@value="http://monurlservice"]',$this->_response->getBody());
}
}

efalcy
committed
class AuthControllerAdminIsLoggedTest extends PortailWithOneLoginModuleTestCase {
protected function _loginHook($account) {
$account->ROLE = "abonne_sigb";
$account->ROLE_LEVEL = ZendAfi_Acl_AdminControllerRoles::ADMIN_PORTAIL;
$account->ID_USER = "1";
$account->PSEUDO = "sysadm";
}
public function setUp() {
$this->sysadm = new Class_Users();
$this->sysadm
->setPseudo('sysadm')
->setRoleLevel(ZendAfi_Acl_AdminControllerRoles::ADMIN_PORTAIL)
->setRole('super_admin')
->setLogin('sysadm')
->setIdSite(1)
->setIdabon('')
->setId(1);
Class_Users::getLoader()->cacheInstance($this->sysadm);
parent::setUp();
$this->dispatch('/opac/auth/login',true);
}
public function testBoiteLoginDisplaysBienvenueSysadm() {
$this->assertQueryContentContains('#boite_login .welcome', 'Bienvenue sysadm',$this->_response->getBody());
}
public function testLinkSeDeconnecter() {
$this->assertXPath('//div[@id="boite_login"]//a[contains(@href, "auth/logout")]',
$this->_response->getBody());
$this->assertXPathContentContains('//div[@id="boite_login"]//a[contains(@href, "auth/logout")]',
'Se déconnecter',$this->_response->getBody());
}
public function testLinkFonctionAdmin() {
$this->assertXPath("//div[@class='configuration_module']//img[contains(@onclick,'admin/modules/auth?config=site&type_module=auth&id_profil=2&action1=login')]");
}
public function testBarreNavShouldDisplayConnexion() {
$this->assertXPathContentContains('//div[@class="barre_nav"]','Connexion',$this->_response->getBody());
}
}
class AuthControllerPostTest extends AuthControllerNobodyLoggedTestCase {
protected $_referer;
public function setup() {
parent::setup();
$this->_referer= BASE_URL.'/cms/viewarticle/12';
$_SERVER['HTTP_REFERER'] = $this->_referer;
}
public function loggingWithOutFillingUsername() {
$this->postDispatch('/opac/auth/boite-login?id_module=4',
public function loggingWithOutFillingPassword() {
$this->postDispatch('/opac/auth/boite-login?id_module=4',
array('username' => 'My overkill username',
'password' => ''),true);
}
public function loggingWithWrongInformation() {
$this->postDispatch('/opac/auth/boite-login?id_module=4',
['username' => 'foo', 'password' => 'bar'],true);
}
public function loggingWithCorrectInformation() {
$user = Class_Users::getLoader()->findFirstBy(array());
$this->postDispatch('/opac/auth/boite-login?id_module=4',
array('username' => $user->getLogin(),
'password' => $user->getPassword()));
}
public function ajaxLoginWithWrongInformation() {
$this->postDispatch('/opac/auth/ajax-login?id_module=4',

llaffont
committed
['username' => 'foo',
'password' => 'zoork',
'redirect' => '/auth/panier'],true);
}
public function loggedAsAdmin() {
$admin = Class_Users::newInstanceWithId(34, ['login' => 'admin'])->beAdminPortail();
ZendAfi_Auth::getInstance()->logUser($admin);
$this->dispatch('/opac/auth/boite-login?id_module=4',true);
}
public function ajaxLoggingWithCorrectInformation() {
$user = Class_Users::getLoader()->findFirstBy(array());
$this->postDispatch('/opac/auth/ajax-login?id_module=4',
array('username' => $user->getLogin(),
'password' => $user->getPassword()));
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
/** @test */
public function emptyUsernameShouldRedirectToReferer() {
$this->loggingWithOutFillingUsername();
$this->assertRedirectTo($this->_referer);
}
/* @test */
public function emptyUsernamePostActionShouldDisplayFlashMessengerWithMessageEntrezVotreIdentifiant() {
$this->loggingWithOutFillingUsername();
$this->assertFlashMessengerContentContains('Entrez votre identifiant');
}
/** @test */
public function emptyPasswordPostActionShouldDisplayFlashMessengerWithMessageEntrezVotreMotDePasse() {
$this->loggingWithOutFillingPassword();
$this->assertFlashMessengerContentContains('Entrez votre mot de passe');
}
/** @test */
public function withAuthenticationFailureFlashMessengerShouldDisplayMessageIdentifiantOuMotDePasseIncorrect(){
$this->loggingWithWrongInformation();
$this->assertFlashMessengerContentContains('Identifiant ou mot de passe incorrect');
}
/** @test */
public function validAuthenticationShouldRedirectToRefererrer() {
$this->loggingWithCorrectInformation();
$this->assertRedirectTo($this->_referer);
}
/** @test */
public function validAjaxAuthenticationShouldRedirectToReferrer() {
$this->ajaxLoggingWithCorrectInformation();
/** @test */
public function invalidAjaxAuthenticationShouldRedirectToActionReferrerWithPopupInFlash() {
$this->ajaxLoginWithWrongInformation();
$this->assertRedirectTo($this->_referer);
$this->assertFlashMessengerEquals(['Identifiant ou mot de passe incorrect.',

llaffont
committed
[ZendAfi_Controller_Action_Helper_FlashMessenger::POPUP => ['url' => '/auth/popup-login?redirect='.urlencode('/auth/panier')]]]);
}
/** @test */
public function validAuthenticationTitreBoiteShouldBeVousEtesConnecte () {
$this->loggedAsAdmin();
$this->assertXPathContentContains('//div[@class="boite login"]//h1','Vous êtes connecté(e)',$this->_response->getBody());
abstract class AuthControllerPostSimpleTestCase extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
$this->_auth = Storm_Test_ObjectWrapper::mock()
->whenCalled('authenticateLoginPassword')
->answers(false)
->whenCalled('hasIdentity')
->answers(false)
->whenCalled('getIdentity')
->answers(null);
ZendAfi_Auth::setInstance($this->_auth);
public function tearDown() {
ZendAfi_Auth::setInstance(null);
parent::tearDown();
}
}
abstract class AuthControllerPostSimpleSuccessfulTestCase extends AuthControllerPostSimpleTestCase {
protected $_web_analytics_client;
public function setUp() {
parent::setUp();
$marcel = Class_Users::newInstanceWithId(2, ['nom' => 'Marcel','login' =>'foo'])->beAbonneSIGB();
$this->_auth
->whenCalled('authenticateLoginPassword')
->with('foo', 'bar')
->willDo(
function() use($marcel) {
$this->_auth->whenCalled('getIdentity')->answers($marcel);
return true;
});
$this->_web_analytics_client = Storm_Test_ObjectWrapper::mock()
->whenCalled('trackEvent')
->answers(true);
ZendAfi_Controller_Action_Helper_TrackEvent::setDefaultWebAnalyticsClient($this->_web_analytics_client);
}
}
class AuthControllerPostSimpleSuccessfulTest extends AuthControllerPostSimpleSuccessfulTestCase {
public function setUp() {
parent::setUp();
['username' => 'foo', 'password' => 'bar'],true);
/** @test */
public function responseShouldBeARedirectToOPAC() {
$this->assertRedirectTo('/opac');
/** @test */
public function trackEventShouldBeGenerated() {
$this->assertTrue($this->_web_analytics_client->methodHasBeenCalledWithParams('trackEvent',
['authentification',
'connexion',
'utilisateur',
}
}

llaffont
committed
class AuthControllerPostSimpleSuccessfulWithRedirectTest extends AuthControllerPostSimpleSuccessfulTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('/opac/auth/login',
['username' => 'foo',
'password' => 'bar',
'redirect' => '/opac/paniers']);
}
/** @test */
public function responseShouldRedirectToOpacPaniers() {
$this->assertRedirectTo('/opac/paniers');

llaffont
committed
}
}
class AuthControllerPostSuccessfulFromCASClientTest extends AuthControllerPostSimpleSuccessfulTestCase {
public function setUp() {
parent::setUp();
$this->postDispatch('/opac/auth/login',
['username' => 'foo',
'password' => 'bar',
'service' => 'http://www.numilog.com/view?book=bilbo']);
/** @test */
public function responseShouldRedirectToCasClientWithTicket() {
$this->assertRedirectTo('http://www.numilog.com/view?book=bilbo&ticket='.md5(Zend_Session::getId()));
}
/** @test */
public function userFooShouldBeLogged() {
$this->assertEquals('foo', Class_Users::getIdentity()->getLogin());
}
class AuthControllerFromCASClientUserConnectedTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
ZendAfi_Auth::getInstance()->logUser(Class_Users::newInstanceWithId('22',['login'=> 'john']));
$this->dispatch('/auth/login?service=http://numilog.com/actionredirected');
}
/** @test */
public function responseShouldRedirectToCasClientServiceWithTicket() {
$this->assertRedirectTo('http://numilog.com/actionredirected?ticket='.md5(Zend_Session::getId()));
}
/** @test */
public function userJohnShouldBeLogged() {
$this->assertEquals('john', Class_Users::getIdentity()->getLogin());
}
}
class AuthControllerPostSimpleFailureTest extends AuthControllerPostSimpleTestCase {
public function setup() {
parent::setup();
$_SERVER['HTTP_REFERER'] = '/opac';
}
/** @test */
public function withAuthenticationFailureResponseShouldNotBeARedirect() {
$this->postDispatch('/opac/auth/login',
['username' => 'foo', 'password' => 'bar']);
$this->assertRedirect();
}
}
class AuthControllerLoginActionRenderTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/opac/auth/login',true);
}
/** @test */
public function authLoginShouldContainForm() {
$this->assertXPath('//form//fieldset[contains(@id, "fieldset-login_form")]');
class AuthControllerLoginActionWithDefaultPreferencesRenderTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
$cfg_accueil = array('modules' => array(4 => array('division' => '4',
'id_module' => 4,
'type_module' => 'LOGIN',
'preferences' => array())));
Class_Profil::getCurrentProfil()
->setBrowser('opac')
->setCfgAccueil(ZendAfi_Filters_Serialize::serialize($cfg_accueil));
$this->dispatch('/opac/auth/login',true);
}
/** @test */
public function labelUserNameShouldContainIdentifiant() {
$this->assertXPathContentContains('//label','Identifiant');
}
/** @test */
public function inputPlaceholderUsernameShouldContainVotreIdentifiant() {
$this->assertXPath('//input[contains(@placeholder, "")]');
}
/** @test */
public function labelPasswordShouldContainMotDePasse() {
$this->assertXPathContentContains('//label','Mot de passe');
}
/** @test */
public function inputPlaceholderPasswordShouldContainVotreMotDePasse() {
$this->assertXPath('//input[contains(@placeholder, "")]');
}
/** @test */
public function linkConnectionShouldHaveOnclickAttributeWithSubmit() {
$this->assertXPath('//a[contains(@onclick, "submit")]');
}
class AuthControllerLostPasswordTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/opac/auth/lostpass', true);
}
/** @test */
public function formActionShouldBeLostPass() {
$this->assertXPath('//form[@name="form_lostpass"][contains(@action, "/auth/lostpass")]');
}
/** @test */
public function formShouldContainsInputForUsername() {
$this->assertXPath('//form/input[@type="text"][@name="username"]');
}
/** @test */
public function pageShouldBeHTML5Valid() {
$this->assertHTML5();
}

llaffont
committed
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
class AuthControllerNobodyLoggedAndRegistrationAllowedRegisterTest extends AuthControllerNobodyLoggedTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::getLoader()
->newInstanceWithId('INTERDIRE_ENREG_UTIL')
->setValeur(0);
$this->dispatch('auth/register', true);
}
/** @test */
public function inputMailShouldBePresent() {
$this->assertXPath('//input[@name="mail"]');
}
/** @test */
public function inputLoginShouldBePresent() {
$this->assertXPath('//input[@name="login"]');
}
/** @test */
public function inputMdpShouldBePresent() {
$this->assertXPath('//input[@name="mdp"]');
}
/** @test */
public function inputMdp2ShouldBePresent() {
$this->assertXPath('//input[@name="mdp2"]');
}
/** @test */
public function inputCaptchaShouldBePresent() {
$this->assertXPath('//input[@name="captcha"]');
}
}