I'm beginner and i want to test inserting user using TestUnit
I have started with this code and i want your help to complete it //App/tests/Controller/UserController
class UserTest extends KernelTestCase
{
public function testUser()
{ $user = new User();
$user->setName("Test name");
$user->setEmail("test@test.com");
$entityManager->persist($user);
$entityManager->flush();
// what add here to complete the test ( if the user is flushed or not for example)
Aucun commentaire:
Enregistrer un commentaire