예제 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->company = new Company();
     $this->marshaller = new JsonToCompany();
     $this->marshaller->setReflectionHydrator(new ReflectionHydrator());
 }
예제 #2
0
 public function setUp()
 {
     $this->service = new Service();
     $this->actionModel = new ActionModel();
     $this->getActionModel()->setRecordId(self::$recordId)->setAction(ActionModel::ACTION_SYNC)->setEntityType(ActionModel::ENTITY_TYPE_COMPANY)->setEntity(json_encode(array('id' => self::$recordId, 'name' => 'foo')));
     Reflection::set($this->getService(), 'consumer', new Consumer());
     $this->getService()->setCompanyService($this->getMock('DeskModule\\Company\\Company'));
     $this->getService()->setCustomerService($this->getMock('DeskModule\\Customer\\Customer'));
     $jsonToCompanyMarshaller = new JsonToCompany();
     $jsonToCompanyMarshaller->setReflectionHydrator(new ReflectionHydrator());
     $this->getService()->setJsonToCompanyMarshaller($jsonToCompanyMarshaller);
     $this->getService()->setJsonToCustomerMarshaller($this->getMock('DeskModule\\Queue\\Marshal\\Customer\\JsonToCustomerDto'));
     $this->getService()->setArchiveService($this->getMockedArchiveService());
     $this->getService()->setConsumerService($this->getConsumerService());
     $this->getService()->setQueueActionService($this->getMock('DeskModule\\Queue\\Action\\Service'));
     $this->getService()->setTransactionEventManager($this->getMock('DeskModule\\Transaction\\Event\\Manager'));
     $this->getService()->setQueueEventManager($this->getMock('DeskModule\\Queue\\Event\\Manager'));
 }