示例#1
0
 /**
  * @expectedException DaoException
  */
 public function testSaveLeaveTypeDuplicateKey()
 {
     /* Following creates LTY008 and makes the entry in hs_hr_unique_id 8 */
     $this->leaveTypeDao->saveLeaveType($this->_getLeaveTypeObjectWithValues());
     /* Changing entry in hs_hr_unique_id to 7 */
     TestDataService::adjustUniqueId(LeaveType, 7, true);
     /* Following should throw an exception for LTY008 */
     $this->leaveTypeDao->saveLeaveType($this->_getLeaveTypeObjectWithValues());
 }