mercredi 27 avril 2016

getEntityManager in PHPunit class test

I am in my phpunit test class extending Symfony\Bundle\FrameworkBundle\Test\KernelTestCase

I would like to get the entityManager to get some data in the database.

How can I do that?

It looks like I have to initialize the parent::kernel, but I dont know what 4 arguments I should pass to the constructor.

Thank you

Aucun commentaire:

Enregistrer un commentaire