public function testGetModuleDefaultPage()
 {
     $userRoleIds = array(1, 2, 3);
     $users = TestDataService::loadObjectList('SystemUser', $this->fixture, 'SystemUser');
     $adminUserSupervisor = $users[3];
     $this->manager->setUser($adminUserSupervisor);
     $module = "time";
     $defaultPage1 = new HomePage();
     $defaultPage1->fromArray(array('id' => 4, "module_id" => 5, "user_role_id" => 1, "action" => 'pim/viewEmployeeTimesheets', "enable_class" => 'TestEnableClass', "priority" => 50));
     $defaultPage2 = new HomePage();
     $defaultPage2->fromArray(array('id' => 5, "module_id" => 5, "user_role_id" => 1, "action" => 'pim/viewEmployeeList', "priority" => 30));
     $defaultPage3 = new HomePage();
     $defaultPage3->fromArray(array('id' => 3, "module_id" => 5, "user_role_id" => 1, "action" => 'pim/viewSystemUsers', "priority" => 30));
     $defaultPage4 = new HomePage();
     $defaultPage4->fromArray(array('id' => 1, "module_id" => 5, "user_role_id" => 1, "action" => 'pim/viewEmployeeList2', "priority" => 10));
     $defaultPage5 = new HomePage();
     $defaultPage5->fromArray(array('id' => 2, "module_id" => 5, "user_role_id" => 1, "action" => 'pim/viewMyDetails', "priority" => 0));
     $defaultPages = array($defaultPage1, $defaultPage2, $defaultPage3, $defaultPage4, $defaultPage5);
     $mockDao = $this->getMock('HomePageDao', array('getModuleDefaultPagesInPriorityOrder'));
     $mockDao->expects($this->once())->method('getModuleDefaultPagesInPriorityOrder')->with($module, $userRoleIds)->will($this->returnValue($defaultPages));
     $this->manager->setHomePageDao($mockDao);
     $homePage = $this->manager->getModuleDefaultPage($module);
     $this->assertEquals('pim/viewEmployeeList', $homePage);
 }