Sfoglia il codice sorgente

fix test: UserController. (token inscription).

bastien 13 anni fa
parent
commit
2be40ff731

+ 10 - 1
src/Muzich/CoreBundle/Tests/Controller/UserControllerTest.php Vedi File

3
 namespace Muzich\CoreBundle\Tests\Controller;
3
 namespace Muzich\CoreBundle\Tests\Controller;
4
 
4
 
5
 use Muzich\CoreBundle\lib\FunctionalTest;
5
 use Muzich\CoreBundle\lib\FunctionalTest;
6
+use Muzich\CoreBundle\Entity\RegistrationToken;
6
 
7
 
7
 class UserControllerTest extends FunctionalTest
8
 class UserControllerTest extends FunctionalTest
8
 {
9
 {
20
     $this->crawler = $this->client->request('GET', $this->generateUrl('index'));
21
     $this->crawler = $this->client->request('GET', $this->generateUrl('index'));
21
     $this->isResponseSuccess();
22
     $this->isResponseSuccess();
22
 
23
 
24
+    // On a besoin d'un token pour le moment
25
+    $token = new RegistrationToken();
26
+    $token->setToken('hekt78yl789dzafdfz');
27
+    $em = $this->getDoctrine()->getEntityManager();
28
+    $em->persist($token);
29
+    $em->flush();
30
+    
23
     $this->procedure_registration_success(
31
     $this->procedure_registration_success(
24
       'raoulc', 
32
       'raoulc', 
25
       'raoulc.def4v65sds@gmail.com', 
33
       'raoulc.def4v65sds@gmail.com', 
26
       'toor', 
34
       'toor', 
27
-      'toor'
35
+      'toor',
36
+      'hekt78yl789dzafdfz'
28
     );
37
     );
29
     
38
     
30
     // Il ne doit y avoir aucun enregistrements de tags favoris
39
     // Il ne doit y avoir aucun enregistrements de tags favoris