Skip to content
Snippets Groups Projects
Commit 65530359 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

fix space before php tag

parent 2583147a
Branches
Tags
1 merge request!1122Hotline#29524 analyse mise en conformite cnil
<?php
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AbstractControllerTestCase.php';
......@@ -68,7 +68,7 @@ abstract class UsersControllerWithMarcusTestCase extends AbstractControllerTestC
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_UserGroup')
->whenCalled('findAllBy')
->answers([]);
$this->assertTrue($this->marcus->isValid());
$this->user_loader = Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users');
......@@ -115,7 +115,7 @@ class UsersControllerEditMarcusTest extends UsersControllerWithMarcusTestCase {
$this->dispatch('/admin/users/edit/id/10', true);
}
/** @test **/
public function roleLevelShouldBeSIGBSubscriber() {
$this->assertXpathContentContains('//tr/td','abonné identifié SIGB');
......@@ -127,7 +127,7 @@ class UsersControllerEditMarcusTest extends UsersControllerWithMarcusTestCase {
$this->assertXPath("//input[@name='username'][@value='mmiller']");
}
/** @test **/
public function testPasswordIsMysecret() {
$this->assertXPath("//input[@name='password'][@value='mysecret']");
......@@ -145,7 +145,7 @@ class UsersControllerEditMarcusTest extends UsersControllerWithMarcusTestCase {
$this->assertXPath("//input[@name='prenom'][@value='Marcus']");
}
/** @test **/
public function testGroupesAreMultimediaAndReferent() {
$this->assertXPath("//input[@name='id_items'][@value='20-22']",$this->_response->getBody());
......@@ -163,7 +163,7 @@ class UsersControllerEditMarcusTest extends UsersControllerWithMarcusTestCase {
$this->assertNotXPath("//select[@name='role']");
}
/** @test **/
public function testSelectedBibIsIdOne() {
$this->assertXPath("//input[@name='bib'][@value='1']", $this->_response->getBody());
......@@ -385,7 +385,7 @@ class UsersControllerPostMarcusDataTest extends UsersControllerWithMarcusTestCas
public function testOrdreabonIsTwo() {
$this->assertEquals(2, $this->marcus->getOrdreabon());
}
public function testPseudoIsDave() {
$this->assertEquals('Dave', $this->marcus->getPseudo());
}
......@@ -419,7 +419,7 @@ class UsersControllerPostMarcusInvalidDataTest extends UsersControllerWithMarcus
$this->assertAction('edit');
$this->assertQueryContentContains('span#abonne_erreur', "Vous devez compléter le champ 'Identifiant'");
$this->assertQueryContentContains('span#abonne_erreur', "Vous devez compléter le champ 'Mot de passe'");
$this->assertQueryContentContains('span#abonne_erreur',
$this->assertQueryContentContains('span#abonne_erreur',
"La bibliothèque est obligatoire pour le rôle : administrateur bibliothèque");
}
......@@ -503,7 +503,7 @@ class UsersControllerPostValidDataWithCommOpsysTest extends UsersControllerWithM
$this->_postData();
$this->assertRedirectTo('/admin/users');
$this->assertEquals($this->marcus,
$this->assertEquals($this->marcus,
$this->user_loader->getFirstAttributeForLastCallOn('save'));
}
......@@ -563,13 +563,13 @@ class UsersControllerReferentIndexTest extends UsersControllerWithMarcusTestCase
public function setUp() {
parent::setUp();
$this->user_loader = Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users');
$this->user_loader = Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users');
$this->user_loader->whenCalled('getIdentity')
->answers($user=Class_Users::newInstanceWithId(2)
->setLogin('referent')
->setRoleLevel(ZendAfi_Acl_AdminControllerRoles::MODO_PORTAIL)
->setPseudo('referent'));
$this->addUserToRightsReferent($user);
$this->dispatch('/admin/users', true);
......@@ -594,7 +594,7 @@ class UsersControllerReferentIndexTest extends UsersControllerWithMarcusTestCase
$this->assertNotXPathContentContains("//td",
'Ajouter un utilisateur',$this->_response->getBody());
}
/** @test **/
......@@ -602,7 +602,7 @@ class UsersControllerReferentIndexTest extends UsersControllerWithMarcusTestCase
$this->assertNotXPath("//a[contains(@href, '/users/edit')]",
$this->_response->getBody());
}
}
......@@ -614,7 +614,7 @@ class UsersControllerAddPostTest extends UsersControllerWithMarcusTestCase {
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Newsletter')
->whenCalled('findAllBy')
->answers([]);
$this->user_loader = Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users');
$this->user_loader = Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users');
}
......@@ -666,7 +666,7 @@ class UsersControllerAddPostTest extends UsersControllerWithMarcusTestCase {
->with($this->marcus)
->never()
->getWrapper()
->whenCalled('getIdentity')
->answers(Class_Users::getLoader()->newInstanceWithId(2)
->setLogin('sysadm')
......
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