public function testSaveLeaveTypeWithoutOperationalCountry()
 {
     TestDataService::truncateSpecificTables(array('LeaveType'));
     $leaveType = $this->_getLeaveTypeObjectWithValues();
     $this->leaveTypeDao->saveLeaveType($leaveType);
     $savedLeaveType = TestDataService::fetchLastInsertedRecord('LeaveType', 'leave_type_id');
     $this->assertTrue(is_null($savedLeaveType->getOperationalCountryId()));
 }
 public function testEditTerminationReason()
 {
     $terminationReason = TestDataService::fetchObject('TerminationReason', 3);
     $terminationReason->setName('2011 Layed off');
     $this->terminationReasonDao->saveTerminationReason($terminationReason);
     $savedTerminationReason = TestDataService::fetchLastInsertedRecord('TerminationReason', 'id');
     $this->assertTrue($savedTerminationReason instanceof TerminationReason);
     $this->assertEquals('2011 Layed off', $savedTerminationReason->getName());
 }
 public function testEditLanguage()
 {
     $language = TestDataService::fetchObject('Language', 3);
     $language->setName('Canadian French');
     $this->languageDao->saveLanguage($language);
     $savedLanguage = TestDataService::fetchLastInsertedRecord('Language', 'id');
     $this->assertTrue($savedLanguage instanceof Language);
     $this->assertEquals('Canadian French', $savedLanguage->getName());
 }
 public function testEditEducation()
 {
     $education = TestDataService::fetchObject('Education', 3);
     $education->setName('MSc New');
     $this->educationDao->saveEducation($education);
     $savedEducation = TestDataService::fetchLastInsertedRecord('Education', 'id');
     $this->assertTrue($savedEducation instanceof Education);
     $this->assertEquals('MSc New', $savedEducation->getName());
 }
 public function testEditLicense()
 {
     $license = TestDataService::fetchObject('License', 3);
     $license->setName('Moon Pilot');
     $this->licenseDao->saveLicense($license);
     $savedLicense = TestDataService::fetchLastInsertedRecord('License', 'id');
     $this->assertTrue($savedLicense instanceof License);
     $this->assertEquals('Moon Pilot', $savedLicense->getName());
 }
 public function testEditReportingMethod()
 {
     $reportingMethod = TestDataService::fetchObject('ReportingMethod', 3);
     $reportingMethod->setName('Finance HR');
     $this->reportingMethodDao->saveReportingMethod($reportingMethod);
     $savedReportingMethod = TestDataService::fetchLastInsertedRecord('ReportingMethod', 'id');
     $this->assertTrue($savedReportingMethod instanceof ReportingMethod);
     $this->assertEquals('Finance HR', $savedReportingMethod->getName());
 }
 public function testEditSkill()
 {
     $skill = TestDataService::fetchObject('Skill', 3);
     $skill->setDescription('Ability to help disabled people');
     $this->skillDao->saveSkill($skill);
     $savedSkill = TestDataService::fetchLastInsertedRecord('Skill', 'id');
     $this->assertTrue($savedSkill instanceof Skill);
     $this->assertEquals('Sign Language', $savedSkill->getName());
     $this->assertEquals('Ability to help disabled people', $savedSkill->getDescription());
 }