Calling a service that uses the EntityManagerInterface in Symfony 3.3 | بلاگ

Calling a service that uses the EntityManagerInterface in Symfony 3.3

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I have a service that uses the EntityManagerInterface:

class DocFinderService
{
   protected $em;

   public function __construct(EntityManagerInterface $entityManager)
   {
     $this->em = $entityManager;
   }

  public function findDocs($specialtyCodes, $city, $state, $zip)
  {...}

How can I test the service using PHPUnit, specifically, how can I pass the EntityManagerInterface parameter from the test function?

asked 38 secs ago
JumpingJack_2

...
نویسنده : استخدام کار بازدید : 8 تاريخ : چهارشنبه 25 بهمن 1396 ساعت: 3:12