public function setUp()
 {
     parent::setUp();
     $this->customerDto = new CustomerDto();
     $this->marshaller = new CustomerDtoToJson();
     $this->marshaller->setReflectionHydrator(new ReflectionHydrator());
 }
Beispiel #2
0
 public function setUp()
 {
     $this->service = new ActionService();
     $this->service->setCompanyToJsonMarshaller(new CompanyToJson());
     $customerToJsonMarshaller = new CustomerDtoToJson();
     $customerToJsonMarshaller->setReflectionHydrator(new \Zend\Stdlib\Hydrator\Reflection());
     $this->service->setCustomerToJsonMarshaller($customerToJsonMarshaller);
     $mockedEntityManager = $this->getMock('Doctrine\\ORM\\EntityManager', array(), array(), '', false);
     $adapter = $this->getMock('EMRCore\\DoctrineConnector\\Adapter\\Adapter');
     $adapter->expects($this->any())->method('getEntityManager')->will($this->returnValue($mockedEntityManager));
     $this->service->setDefaultMasterSlave($adapter);
     $this->company = new Company();
 }