@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace Tests\AppBundle\Controller; |
4 | 4 | |
5 | 5 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
6 | -use Symfony\Component\DependencyInjection\ContainerInterface; |
|
7 | -use Doctrine\ORM\EntityManager; |
|
8 | 6 | use AppBundle\Entity\User; |
9 | 7 | |
10 | 8 | class UserControllerTest extends WebTestCase |
@@ -98,9 +98,10 @@ |
||
98 | 98 | 'validation_groups' => array('registration'), |
99 | 99 | ]); |
100 | 100 | $form->handleRequest($request); |
101 | - if ($form->isSubmitted()) |
|
102 | - if ($form->isValid()) { |
|
101 | + if ($form->isSubmitted()) { |
|
102 | + if ($form->isValid()) { |
|
103 | 103 | $em->persist($user); |
104 | + } |
|
104 | 105 | $em->flush(); |
105 | 106 | |
106 | 107 | return $this->redirect($this->generateUrl("users_list")); |