public function setup()
 {
     parent::setup();
     $this->fakeAuth = new FakeAuth();
     $this->loginContext = $loginContext = new WebLoginContext(new LoginData(true));
     $this->webAuth = new WebAuthentication($this->fakeAuth, $this->fakeServer);
 }
 public function setup()
 {
     parent::setup();
     $this->page = new FakeSavedReportsPage();
     $this->service = $this->getMock('IReportingService');
     $this->presenter = new SavedReportsPresenter($this->page, $this->fakeUser, $this->service);
 }
 public function setup()
 {
     parent::setup();
     $this->attributeRepository = new FakeAttributeRepository();
     $this->controller = new AttributeSaveController($this->attributeRepository);
     $this->session = new FakeWebServiceUserSession(1);
 }
 public function setup()
 {
     $this->userRepository = $this->getMock('IUserRepository');
     $this->user = new FakeUserSession();
     $this->repo = new ScheduleAdminScheduleRepository($this->userRepository, $this->user);
     parent::setup();
 }
 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('IManageResourceGroupsPage');
     $this->resourceRepository = $this->getMock('IResourceRepository');
     $this->presenter = new ManageResourceGroupsPresenter($this->page, $this->fakeUser, $this->resourceRepository);
 }
 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->layout = $this->getMock('IScheduleLayout');
     $this->rule = new SchedulePeriodRule($this->scheduleRepository, $this->fakeUser);
 }
 public function setup()
 {
     parent::setup();
     $this->authentication = $this->getMock('IWebServiceAuthentication');
     $this->server = new FakeRestServer();
     $this->service = new AuthenticationWebService($this->server, $this->authentication);
 }
 public function setup()
 {
     parent::setup();
     $this->server = new FakeRestServer();
     $this->controller = $this->getMock('IUserSaveController');
     $this->service = new UsersWriteWebService($this->server, $this->controller);
 }
 public function setup()
 {
     parent::setup();
     $this->attributeService = $this->getMock('IAttributeService');
     $this->userRepository = $this->getMock('IUserViewRepository');
     $this->validator = new UserRequestValidator($this->attributeService, $this->userRepository);
 }
 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->schedule = new FakeSchedule();
     $this->schedule->SetTimezone('America/Chicago');
 }
 public function setup()
 {
     parent::setup();
     $this->attributeService = $this->getMock('IAttributeService');
     $this->server = new FakeRestServer();
     $this->service = new AttributesWebService($this->server, $this->attributeService);
 }
 public function setup()
 {
     parent::setup();
     $this->page = new FakeAttributePage();
     $this->attributeRepository = $this->getMock('IAttributeRepository');
     $this->presenter = new ManageAttributesPresenter($this->page, $this->attributeRepository);
 }
 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->layout = $this->getMock('IScheduleLayout');
     $this->fakeConfig->SetSectionKey(ConfigSection::RESERVATION, ConfigKeys::RESERVATION_START_TIME_CONSTRAINT, ReservationStartTimeConstraint::FUTURE);
 }
 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('ICalendarSubscriptionPage');
     $this->subscriptionService = $this->getMock('ICalendarSubscriptionService');
     $this->validator = new CalendarSubscriptionValidator($this->page, $this->subscriptionService);
 }
 public function setup()
 {
     parent::setup();
     $this->reservationRepository = $this->getMock('IReservationViewRepository');
     $this->accessoryRepository = $this->getMock('IAccessoryRepository');
     $this->rule = new AccessoryAvailabilityRule($this->reservationRepository, $this->accessoryRepository, 'UTC');
 }
Example #16
0
 public function setup()
 {
     parent::setup();
     $this->now = Date::Parse('2011-07-20 13:41:22', 'America/Chicago');
     Date::_SetNow($this->now);
     $this->timezone = $this->now->Timezone();
 }
 public function setup()
 {
     parent::setup();
     $this->activationRepo = $this->getMock('IAccountActivationRepository');
     $this->userRepo = $this->getMock('IUserRepository');
     $this->activation = new AccountActivation($this->activationRepo, $this->userRepo);
 }
 public function setup()
 {
     parent::setup();
     Date::_SetNow(mktime());
     $this->page = new FakeDashboardPage();
     $this->presenter = new DashboardPresenter($this->page);
 }
 public function setup()
 {
     parent::setup();
     $this->reservationViewRepository = $this->getMock('IReservationViewRepository');
     $this->userRepository = $this->getMock('IUserRepository');
     $this->reservationAuthorization = $this->getMock('IReservationAuthorization');
     $this->service = new ResourceAdminManageReservationsService($this->reservationViewRepository, $this->userRepository, $this->reservationAuthorization, $this->getMock('IReservationHandler'), $this->getMock('IUpdateReservationPersistenceService'));
 }
 public function setup()
 {
     parent::setup();
     $this->authorizationService = $this->getMock('IAuthorizationService');
     $this->currentUser = new FakeUserSession(false, null, 998);
     $this->adminUser = new FakeUserSession(true, null, 999);
     $this->reservationAuthorization = new ReservationAuthorization($this->authorizationService);
 }
 public function setup()
 {
     $this->validator = $this->getMock('IResourceRequestValidator');
     $this->repository = $this->getMock('IResourceRepository');
     $this->session = new FakeWebServiceUserSession(1);
     $this->controller = new ResourceSaveController($this->repository, $this->validator);
     parent::setup();
 }
Example #22
0
 public function setup()
 {
     $this->reservationViewRepository = $this->getMock('IReservationViewRepository');
     $this->tz = 'America/Chicago';
     $this->schedule = new Schedule(1, null, null, null, null, $this->tz);
     $this->user = new FakeUser();
     parent::setup();
 }
 public function setup()
 {
     parent::setup();
     $this->manageUserServiceFactory = $this->getMock('IManageUsersServiceFactory');
     $this->manageUsersService = $this->getMock('IManageUsersService');
     $this->requestValidator = $this->getMock('IUserRequestValidator');
     $this->controller = new UserSaveController($this->manageUserServiceFactory, $this->requestValidator);
 }
 public function setup()
 {
     $this->server = new FakeRestServer();
     $this->resourceRepository = $this->getMock('IResourceRepository');
     $this->accessoryRepository = $this->getMock('IAccessoryRepository');
     $this->service = new AccessoriesWebService($this->server, $this->resourceRepository, $this->accessoryRepository);
     parent::setup();
 }
 public function setup()
 {
     parent::setup();
     Date::_SetNow(new Date());
     $this->page = new FakeAnnouncementsControl();
     $this->announcements = new FakeAnnouncementRepository();
     $this->presenter = new AnnouncementPresenter($this->page, $this->announcements);
 }
 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('IActivationPage');
     $this->accountActivation = new FakeActivation();
     $this->auth = new FakeWebAuthentication();
     $this->presenter = new ActivationPresenter($this->page, $this->accountActivation, $this->auth);
 }
 public function setup()
 {
     parent::setup();
     $this->userRepo = $this->getMock('IUserRepository');
     $this->resourceRepo = $this->getMock('IResourceRepository');
     $this->scheduleRepo = $this->getMock('IScheduleRepository');
     $this->service = new CalendarSubscriptionService($this->userRepo, $this->resourceRepo, $this->scheduleRepo);
 }
 public function setup()
 {
     parent::setup();
     WebServiceSessionToken::$_Token = 'hard coded token';
     $this->fakeAuth = new FakeAuth();
     $this->userSessionRepository = $this->getMock('IUserSessionRepository');
     $this->webAuth = new WebServiceAuthentication($this->fakeAuth, $this->userSessionRepository);
 }
 public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('IManageAccessoriesPage');
     $this->resourceRepository = $this->getMock('IResourceRepository');
     $this->accessoryRepository = $this->getMock('IAccessoryRepository');
     $this->presenter = new ManageAccessoriesPresenter($this->page, $this->resourceRepository, $this->accessoryRepository);
 }
 public function setup()
 {
     parent::setup();
     $this->server = new FakeRestServer();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->privacyFilter = $this->getMock('IPrivacyFilter');
     $this->service = new SchedulesWebService($this->server, $this->scheduleRepository, $this->privacyFilter);
 }