protected function setUp() { MockAnnotations::init($this); $this->localeSettings->expects($this->any())->method('getTimeZone')->will($this->returnValue('UTC')); $this->periodFactory = new PeriodFactory($this->localeSettings); $this->service = new TimeSheetServiceImpl($this->worklogRepository, $this->periodFactory, $this->localeSettings); }
protected function setUp() { MockAnnotations::init($this); $this->request = $this->getMockForAbstractClass('Symfony\\Component\\HttpFoundation\\Request'); $this->responseEvent->expects($this->once())->method('getRequest')->will($this->returnValue($this->request)); $this->wsseListener = new WsseListener($this->serializer, $this->securityContext, $this->authenticationManager, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->searchQuery = $this->getMockForAbstractClass('\\Doctrine\\ORM\\AbstractQuery', array($this->em)); $this->classMetadata->name = self::CLASS_NAME; $this->repository = new DoctrineTicketRepository($this->em, $this->classMetadata); }
protected function setUp() { // force loading for annotation class_exists('Diamante\\ApiBundle\\Annotation\\ApiDoc'); MockAnnotations::init($this); $this->reader = new AnnotationReader(); $this->loader = new RestServiceLoader($this->container, $this->reader); }
protected function setUp() { MockAnnotations::init($this); $this->dirMock = new FileInfoStub(self::NON_WRITABLE_DIR, false, false); $this->fixturesDir = __DIR__ . self::FIXTURE_FOLDER; $this->fileMock = new UploadedFileStub($this->fixturesDir . '/' . self::PNG_FIXTURE_NAME, self::PNG_FIXTURE_NAME); $this->handler = new BranchLogoHandler($this->dirMock, $this->fileSysMock); }
protected function setUp() { MockAnnotations::init($this); $factory = new TicketFactory('\\Diamante\\DeskBundle\\Model\\Ticket\\Ticket'); $this->builder = new CommonTicketBuilder($factory, $this->branchRepository, $this->userService); $this->branchRepository->expects($this->once())->method('get')->with(self::BRANCH_ID)->will($this->returnValue($this->createBranch())); $this->userService->expects($this->once())->method('getByUser')->with(new User(self::ASSIGNEE_ID, User::TYPE_ORO))->will($this->returnValue($this->createAssignee())); }
protected function setUp() { MockAnnotations::init($this); $this->auditEntityMapper->addAuditEntryClass('Diamante\\UserBundle\\Entity\\DiamanteUser', 'Diamante\\DeskBundle\\Entity\\Audit'); $this->auditEntityMapper->addAuditEntryFieldClass('Diamante\\UserBundle\\Entity\\DiamanteUser', 'Diamante\\DeskBundle\\Entity\\AuditField'); $this->container->expects($this->any())->method('get')->will($this->returnValue($this->oroAuditEntityMapper))->with($this->equalTo('oro_dataaudit.loggable.audit_entity_mapper')); $this->loggableManager = new LoggableManager('Oro\\Bundle\\DataAuditBundle\\Entity\\Audit', 'Oro\\Bundle\\DataAuditBundle\\Entity\\AuditField', $this->provider, $this->securityContextLink, $this->auditEntityMapper, $this->container); }
protected function setUp() { MockAnnotations::init($this); $this->em->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->emConfiguration)); $this->emConfiguration->expects($this->any())->method('getDefaultQueryHints')->will($this->returnValue([])); $this->searchQuery = $this->getMockForAbstractClass('\\Doctrine\\ORM\\AbstractQuery', array($this->em)); $this->classMetadata->name = self::CLASS_NAME; $this->repository = new DoctrineTicketRepository($this->em, $this->classMetadata); }
protected function setUp() { MockAnnotations::init($this); $this->manager = new ManagerImpl($this->registry, $this->fileStorageService, $this->factory, $this->repository, $this->imagine, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->listener = new TicketListener(); }
protected function setUp() { MockAnnotations::init($this); $this->branchServiceImpl = new BranchApiServiceImpl($this->registry, $this->branchFactory, $this->branchRepository, $this->branchLogoHandler, $this->tagManager, $this->authorizationService, $this->userService); $this->branchServiceImpl->setApiPagingService($this->apiPagingService); }
protected function setUp() { MockAnnotations::init($this); $this->factory = new BranchFactory('\\Diamante\\DeskBundle\\Model\\Branch\\Branch', $this->branchKeyGenerator); }
protected function setUp() { MockAnnotations::init($this); $this->classMetadata->name = self::CLASS_NAME; $this->repository = new DoctrineWorklogRepository($this->em, $this->classMetadata); }
protected function setUp() { MockAnnotations::init($this); $this->notificationDeliveryManager = new NotificationDeliveryManager(); $this->ticketService = new TicketServiceImpl($this->em, $this->ticketRepository, $this->branchRepository, $this->ticketBuilder, $this->attachmentManager, $this->userService, $this->authorizationService, $this->dispatcher, $this->notificationDeliveryManager, $this->notifier, $this->ticketHistoryRepository, $this->tagManager, $this->securityFacade); }
protected function setUp() { MockAnnotations::init($this); $this->service = new WorklogServiceImpl($this->worklogRepository, $this->worklogFactory, $this->timeSpentFactory); }
protected function setUp() { MockAnnotations::init($this); $this->branchEmailConfigurationServiceImpl = new BranchEmailConfigurationServiceImpl($this->doctrineRegistry, $this->branchEmailConfigurationFactory, $this->branchEmailConfigurationRepository, $this->branchRepository, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->service = new RegistrationServiceImpl($this->diamanteUserRepository, $this->diamanteUserFactory, $this->apiUserRepository, $this->apiUserFactory, $this->registrationMailer); }
protected function setUp() { MockAnnotations::init($this); $this->diamanteUser = new DiamanteUser('*****@*****.**', 'First', 'Last'); }
protected function setUp() { MockAnnotations::init($this); $this->messageReferenceService = new MessageReferenceServiceImpl($this->em, $this->messageReferenceRepository, $this->ticketRepository, $this->ticketBuilder, $this->commentFactory, $this->userService, $this->attachmentManager, $this->dispatcher, $this->notificationDeliveryManager, $this->notifier, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->diamanteUserService = new UserServiceImpl($this->oroUserManager, $this->diamanteUserRepository, $this->diamanteUserFactory, $this->attachmentManager, $this->apiUserRepository); }
protected function setUp() { MockAnnotations::init($this); $this->userDetailsExtension = new UserDetailsExtension($this->userService); }
protected function setUp() { MockAnnotations::init($this); $this->manager = new MessageProcessingManager($this->context, $this->strategyHolder, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->ticketStrategy = new TicketStrategy($this->messageReferenceService, $this->branchEmailConfigurationService, $this->emailProcessingSettings, $this->watcherService, $this->oroUserManager, $this->configManager, $this->userService); }
public function setUp() { MockAnnotations::init($this); $this->service = new CommentApiServiceImpl($this->registry, $this->ticketRepository, $this->commentRepository, $this->commentFactory, $this->userService, $this->attachmentManager, $this->authorizationService, $this->dispatcher); $this->service->setApiPagingService($this->apiPagingService); $this->_dummyTicket = new Ticket(new UniqueId('unique_id'), new TicketSequenceNumber(12), self::DUMMY_TICKET_SUBJECT, self::DUMMY_TICKET_DESCRIPTION, $this->createBranch(), $this->createAuthor(), $this->createAssignee(), new Source(Source::PHONE), new Priority(Priority::PRIORITY_LOW), new Status(Status::CLOSED)); }
protected function setUp() { MockAnnotations::init($this); }
protected function setUp() { MockAnnotations::init($this); $this->service = new CurrentUserApiServiceImpl($this->diamanteUserRepository, $this->apiUserRepository, $this->authorizationService, $this->logger); }
protected function setUp() { MockAnnotations::init($this); $this->validator = new UserValidator(); $this->validator->initialize($this->context); }
protected function setUp() { MockAnnotations::init($this); $this->eventProvider = new DomainEventProvider(); }
protected function setUp() { MockAnnotations::init($this); $this->renderTagExtensionExtension = new RenderTagExtension($this->tagManager, $this->registry); }
protected function setUp() { MockAnnotations::init($this); $this->strategyHolder = new StrategyHolder(); }