public function setup()
 {
     parent::setup();
     $this->page = $this->getMock('IManageReservationsPage');
     $this->reservationsService = $this->getMock('IManageReservationsService');
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->resourceRepository = $this->getMock('IResourceRepository');
     $this->attributeService = $this->getMock('IAttributeService');
     $this->userPreferenceRepository = $this->getMock('IUserPreferenceRepository');
     $this->presenter = new ManageReservationsPresenter($this->page, $this->reservationsService, $this->scheduleRepository, $this->resourceRepository, $this->attributeService, $this->userPreferenceRepository);
     $this->userPreferenceRepository->expects($this->any())->method('GetAllUserPreferences')->with($this->anything())->will($this->returnValue(array()));
 }
 /**
  * @param IUserPreferenceRepository $userPreferenceRepository
  * @param int $userId
  */
 public function Update(IUserPreferenceRepository $userPreferenceRepository, $userId)
 {
     foreach (self::$filterKeys as $filterName => $defaultValue) {
         $userPreferenceRepository->SetUserPreference($userId, $filterName, $this->{$filterName});
     }
 }