Browse Source

Evolution #48: Ajout de tests: Inscription: pseudo trop court, trop long.

bastien 13 years ago
parent
commit
0391b7fa75
1 changed files with 17 additions and 43 deletions
  1. 17 43
      src/Muzich/CoreBundle/Tests/Controller/IndexControllerTest.php

+ 17 - 43
src/Muzich/CoreBundle/Tests/Controller/IndexControllerTest.php View File

@@ -91,32 +91,6 @@ class IndexControllerTest extends FunctionalTest
91 91
       'toor', 
92 92
       'toor'
93 93
     );
94
-    
95
-//    $this->validate_registrate_user_form(
96
-//      $this->selectForm('form[action="'.$url.'"] input[type="submit"]'), 
97
-//      'raoula', 
98
-//      'raoul.45gf64z@gmail.com', 
99
-//      'toor',
100
-//      'toor'
101
-//    );
102
-//    
103
-//    $this->isResponseRedirection();
104
-//    $this->followRedirection();
105
-//    $this->isResponseSuccess();
106
-//
107
-//    $user = $this->getUser();
108
-//    $this->assertEquals('raoula', $user->getUsername());
109
-//    
110
-//    // L'utilisateur est enregistré, il doit donc être en base
111
-//    $db_user = $this->getDoctrine()->getRepository('MuzichCoreBundle:User')
112
-//      ->findOneByUsername('raoula')
113
-//    ;
114
-//    
115
-//    $this->assertTrue(!is_null($db_user));
116
-//    if ($db_user)
117
-//    {
118
-//      $this->assertEquals('raoula', $db_user->getUsername());
119
-//    }
120 94
   }
121 95
   
122 96
   public function testRegistrationFailure()
@@ -135,23 +109,23 @@ class IndexControllerTest extends FunctionalTest
135 109
       'toorr'
136 110
     );
137 111
 
138
-//    // Pseudo trop court
139
-//    $this->procedure_registration_failure(
140
-//      'ra', 
141
-//      'raoulb.def4v65sds@gmail.com', 
142
-//      'toor', 
143
-//      'toor'
144
-//    );
145
-//    
146
-//    // Pseudo trop long
147
-//    $this->procedure_registration_failure(
148
-//      'raouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'
149
-//         .'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'
150
-//         .'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuul', 
151
-//      'raoulb.def4v65sds@gmail.com', 
152
-//      'toor', 
153
-//      'toor'
154
-//    );
112
+    // Pseudo trop court
113
+    $this->procedure_registration_failure(
114
+      'ra', 
115
+      'raoulb.def4v65sds@gmail.com', 
116
+      'toor', 
117
+      'toor'
118
+    );
119
+    
120
+    // Pseudo trop long
121
+    $this->procedure_registration_failure(
122
+      'raouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'
123
+         .'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'
124
+         .'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuul', 
125
+      'raoulb.def4v65sds@gmail.com', 
126
+      'toor', 
127
+      'toor'
128
+    );
155 129
 
156 130
     // Email invalide
157 131
     $this->procedure_registration_failure(