Commit f5041708df71f1d18410b66c1099fb1429a1af50
1 parent
55859d6a
Exists in
master
and in
1 other branch
cleanup stats
Showing
3 changed files
with
24 additions
and
16 deletions
Show diff stats
src/Controller/UsersController.php
... | ... | @@ -263,7 +263,7 @@ class UsersController extends AppController |
263 | 263 | } |
264 | 264 | private function _getCurrentUserEntityFromSession($session_user = null) { |
265 | 265 | $user_fullname = $this->_getCurrentUserFullNameFromSession($session_user); |
266 | - debug($user_fullname); | |
266 | + //debug($user_fullname); | |
267 | 267 | // "Pallier Etienne" |
268 | 268 | return $this->Users->find()->where(['nom'=>$user_fullname])->first(); |
269 | 269 | } | ... | ... |
tests/Fixture/MaterielsFixture.php
... | ... | @@ -712,7 +712,8 @@ class MaterielsFixture extends TestFixture { |
712 | 712 | |
713 | 713 | //'nom_responsable' => 'Lorem ipsum dolor sit amet', |
714 | 714 | //'nom_responsable' => 'test0 test9', |
715 | - 'nom_responsable' => 'user5 USER', | |
715 | + ////'nom_responsable' => 'user5 USER', | |
716 | + 'nom_responsable' => 'USER user5', | |
716 | 717 | 'email_responsable' => 'Lorem ipsum dolor sit amet', |
717 | 718 | //'nom_createur' => 'Lorem ipsum dolor sit amet', |
718 | 719 | //'nom_createur' => 'test0 test9', |
... | ... | @@ -850,10 +851,12 @@ class MaterielsFixture extends TestFixture { |
850 | 851 | 'lieu_detail' => 'Lorem ipsum dolor sit amet', |
851 | 852 | 'gestionnaire_id' => 1, |
852 | 853 | //'nom_responsable' => 'test0 test9', |
853 | - 'nom_responsable' => 'user5 USER', | |
854 | + /////'nom_responsable' => 'user5 USER', | |
855 | + 'nom_responsable' => 'USER user5', | |
854 | 856 | 'email_responsable' => 'Lorem ipsum dolor sit amet', |
855 | 857 | //'nom_createur' => 'test0 test9', |
856 | - 'nom_createur' => 'user5 USER', | |
858 | + //////'nom_createur' => 'user5 USER', | |
859 | + 'nom_createur' => 'USER user5', | |
857 | 860 | 'nom_modificateur' => 'Lorem ipsum dolor sit amet', |
858 | 861 | 'created' => '2020-04-19 09:09:29', |
859 | 862 | 'modified' => '2020-04-19 09:09:29', |
... | ... | @@ -941,7 +944,6 @@ class MaterielsFixture extends TestFixture { |
941 | 944 | 'etiquette' => 1, |
942 | 945 | 'lieu_detail' => 'Lorem ipsum dolor sit amet', |
943 | 946 | 'gestionnaire_id' => 1, |
944 | - //'nom_responsable' => 'Jesus', | |
945 | 947 | 'nom_responsable' => 'nobody', |
946 | 948 | 'email_responsable' => 'Lorem ipsum dolor sit amet', |
947 | 949 | 'nom_createur' => 'Lorem ipsum dolor sit amet', |
... | ... | @@ -986,7 +988,6 @@ class MaterielsFixture extends TestFixture { |
986 | 988 | 'date_archivage' => yyyy1mmdd2, |
987 | 989 | 'etiquette' => 1, |
988 | 990 | 'lieu_detail' => 'Lorem ipsum dolor sit amet', |
989 | - //'nom_responsable' => 'Jesus', | |
990 | 991 | 'nom_responsable' => 'nobody', |
991 | 992 | 'email_responsable' => 'Lorem ipsum dolor sit amet', |
992 | 993 | 'nom_createur' => 'Lorem ipsum dolor sit amet', | ... | ... |
tests/TestCase/Controller/UsersControllerTest.php
... | ... | @@ -39,11 +39,14 @@ class UsersControllerTest extends General |
39 | 39 | protected function getNewEntityWithAllMandatoryFields() { |
40 | 40 | return [ |
41 | 41 | //'nom' => 'test9 test0', |
42 | - 'nom' => 'user6 USER', | |
42 | + /////'nom' => 'user6 USER', | |
43 | + 'nom' => 'USER user6', | |
43 | 44 | //'username' => 'testt', |
44 | - 'username' => 'user6_USER', | |
45 | + /////'username' => 'user6_USER', | |
46 | + 'username' => 'u6USER', | |
45 | 47 | 'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2', |
46 | - 'email' => 'testt@test.fr', | |
48 | + //////'email' => 'testt@test.fr', | |
49 | + 'email' => 'user6.USER@test.fr', | |
47 | 50 | 'role' => 'Utilisateur', |
48 | 51 | 'groupes_metier_id' => 1, |
49 | 52 | 'groupes_thematique_id' => 1 |
... | ... | @@ -146,19 +149,23 @@ class UsersControllerTest extends General |
146 | 149 | |
147 | 150 | $data = [ |
148 | 151 | 'id' => 6, |
149 | - 'nom' => 'Test3 Test4', | |
150 | - 'username' => 'testo', | |
151 | - 'password' => 'test', | |
152 | - 'email' => 'testo@test.fr', | |
153 | - 'role' => 'Super Administrateur', | |
152 | + ////'nom' => 'Test3 Test4', | |
153 | + 'nom' => 'SUPER testAdd', | |
154 | + /////'username' => 'testo', | |
155 | + 'username' => 'taddSUPER', | |
156 | + 'password' => 'test', | |
157 | + /////'email' => 'testo@test.fr', | |
158 | + 'email' => 'testAdd.SUPER@test.fr', | |
159 | + 'role' => 'Super Administrateur', | |
154 | 160 | 'groupes_metier_id' => 1, |
155 | - 'groupes_thematique_id' => 1, | |
161 | + 'groupes_thematique_id' => 1, | |
156 | 162 | 'sur_categorie_id' => 1 |
157 | 163 | ]; |
158 | 164 | |
159 | 165 | $this->post('/users/add', $data); |
160 | 166 | $this->get('/users/view/6'); |
161 | - $this->assertResponseContains('Test3 Test4', 'L\'ajout d\'un utilisateur ne fonctionne pas correctement'); | |
167 | + //$this->assertResponseContains('Test3 Test4', 'L\'ajout d\'un utilisateur ne fonctionne pas correctement'); | |
168 | + $this->assertResponseContains('testAdd SUPER', 'L\'ajout d\'un utilisateur ne fonctionne pas correctement'); | |
162 | 169 | } |
163 | 170 | |
164 | 171 | ... | ... |