当前位置: 首页>>代码示例>>PHP>>正文


PHP TestDataService::fetchLastInsertedRecord方法代码示例

本文整理汇总了PHP中TestDataService::fetchLastInsertedRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP TestDataService::fetchLastInsertedRecord方法的具体用法?PHP TestDataService::fetchLastInsertedRecord怎么用?PHP TestDataService::fetchLastInsertedRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestDataService的用法示例。


在下文中一共展示了TestDataService::fetchLastInsertedRecord方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testSaveLeaveTypeWithoutOperationalCountry

 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()));
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:8,代码来源:LeaveTypeDaoTest.php

示例2: testEditTerminationReason

 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());
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:9,代码来源:TerminationReasonDaoTest.php

示例3: testEditLanguage

 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());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:LanguageDaoTest.php

示例4: testEditEducation

 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());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:EducationDaoTest.php

示例5: testEditLicense

 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());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:LicenseDaoTest.php

示例6: testEditReportingMethod

 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());
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:9,代码来源:ReportingMethodDaoTest.php

示例7: testEditSkill

 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());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:10,代码来源:SkillDaoTest.php


注:本文中的TestDataService::fetchLastInsertedRecord方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。