public function ShowUserAttributes() { // User attributes on Dashboard, Added by Burak C. $userId = ServiceLocator::GetServer()->GetUserSession()->UserId; $userRepository = new UserRepository(); $this->user = $userRepository->LoadById($userId); $attributeService = new AttributeService(new AttributeRepository()); $attributes = $attributeService->GetByCategory(CustomAttributeCategory::USER); $reservationViewRepository = new ReservationViewRepository(); $startDate = Date::Now(); $endDate = $startDate->AddDays(30); $reservations = $reservationViewRepository->GetReservationList($startDate, $endDate, $userId, ReservationUserLevel::INVITEE); $this->_page->Set("invitations", $reservations); $this->_page->Set("user", $this->user); $this->_page->Set("attributes", $attributes); }
public function testPassThroughForCategory() { $categoryId = 123; $this->attributeRepository->expects($this->once())->method('GetByCategory')->with($this->equalTo($categoryId))->will($this->returnValue(array())); $this->attributeService->GetByCategory($categoryId); }