I am new in testing.I want test my function.Here is my code
$em = $this->getDoctrine()->getEntityManager();
$id = $_REQUEST['id'];
$documents = $em->createQueryBuilder()
->select('documents')
->from('DRPAdminBundle:Document', 'documents')
->where('documents.book_id=:id')
->setParameter('id', $id)
->getQuery()
->getArrayResult();
How can I test this function using PhpUnit.
Please Help.
Aucun commentaire:
Enregistrer un commentaire