Esempio n. 1
0
 public function testGetroomdetails()
 {
     $data['intRoomId'] = '2';
     $data['vchRoomname'] = 'Room 2';
     $room = new Default_Model_Room();
     $this->assertArrayHasKey('5', $room->getroomdetails());
     $this->assertContains($data, $room->getroomdetails());
 }
Esempio n. 2
0
 /** Displays the homepage with the list of rooms
  * 
  * @return details of the room 
  */
 public function homepageAction()
 {
     $session = new Zend_Session_Namespace('user');
     if ($session->user_id) {
         $room = new Default_Model_Room();
         $this->view->entries = $room->getroomdetails();
     } else {
         $this->_helper->redirector->gotoRoute(array('controller' => ''));
     }
 }