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


PHP TestDataService::truncateSpecificTables方法代码示例

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


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

示例1: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/BasicUserRoleManager.yml';
     TestDataService::truncateSpecificTables(array('SystemUser', 'Project', 'JobCandidate', 'JobVacancy', 'JobInterview'));
     TestDataService::populate($this->fixture);
     $this->manager = new BasicUserRoleManager();
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:10,代码来源:BasicUserRoleManagerTest.php

示例2: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/ScreenDao.yml';
     TestDataService::truncateSpecificTables(array('SystemUser'));
     TestDataService::populate($this->fixture);
     $this->dao = new ScreenDao();
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:10,代码来源:ScreenDaoTest.php

示例3: setUp

 protected function setUp()
 {
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmTimePlugin/test/fixtures/TimesheetService.yml';
     TestDataService::truncateSpecificTables(array('SystemUser'));
     TestDataService::populate($this->fixture);
     $this->timesheetService = new TimesheetService();
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:7,代码来源:TimesheetServiceTest.php

示例4: setUp

 protected function setUp()
 {
     TestDataService::truncateSpecificTables(array('Employee', 'Leave', 'LeaveRequest', 'LeaveType', 'EmployeeLeaveEntitlement', 'LeavePeriod'));
     // Save leave type
     $leaveTypeData = sfYaml::load(sfConfig::get('sf_plugins_dir') . '/orangehrmCoreLeavePlugin/test/fixtures/leaveType.yml');
     $leaveTypeDao = new LeaveTypeDao();
     $leaveType = new LeaveType();
     $leaveType->setLeaveTypeName($leaveTypeData['leaveType']['LT_001']['name']);
     //                $leaveType->setLeaveRules($leaveTypeData['leaveType']['LT_001']['rule']);
     $leaveTypeDao->saveLeaveType($leaveType);
     $this->leaveType = $leaveType;
     $this->leaveTypeId = $leaveType->getLeaveTypeId();
     // Save leave Period
     $leavePeriodData = sfYaml::load(sfConfig::get('sf_plugins_dir') . '/orangehrmCoreLeavePlugin/test/fixtures/leavePeriod.yml');
     $leavePeriodService = new LeavePeriodService();
     $leavePeriodService->setLeavePeriodDao(new LeavePeriodDao());
     $leavePeriod = new LeavePeriod();
     $leavePeriod->setStartDate($leavePeriodData['leavePeriod']['1']['startDate']);
     $leavePeriod->setEndDate($leavePeriodData['leavePeriod']['1']['endDate']);
     $leavePeriodService->saveLeavePeriod($leavePeriod);
     $this->leavePeriod = $leavePeriod;
     $this->leavePeriodId = $leavePeriod->getLeavePeriodId();
     // Save Employee
     $employeeservice = new EmployeeService();
     $this->employee = new Employee();
     $employeeservice->saveEmployee($this->employee);
     $this->empNumber = $this->employee->getEmpNumber();
     // save leave quota
     $this->leaveEntitlement = sfYaml::load(sfConfig::get('sf_plugins_dir') . '/orangehrmCoreLeavePlugin/test/fixtures/leaveEntitlement.yml');
     $this->leaveEntitlementDao = new LeaveEntitlementDao();
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:31,代码来源:LeaveEntitlementDaoTest.php

示例5: 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

示例6: testSaveCandidateHistory

 public function testSaveCandidateHistory()
 {
     TestDataService::truncateSpecificTables(array('CandidateHistory'));
     $candidateHistory = new CandidateHistory();
     $candidateHistory->vacancyId = 2;
     $candidateHistory->candidateId = 1;
     $candidateHistory->action = 2;
     $candidateHistory->performedBy = null;
     $candidateHistory->performedDate = '2011-04-05';
     $candidateHistory->note = 'dvfsdfds';
     $result = $this->candidateDao->SaveCandidateHistory($candidateHistory);
     $this->assertTrue($result);
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:13,代码来源:CandidateDaoTest.php

示例7: testSaveJobVacancy

 /**
  * Testing getVacancyList
  */
 public function testSaveJobVacancy()
 {
     TestDataService::truncateSpecificTables(array('JobVacancy'));
     $jobVacancy = new JobVacancy();
     $jobVacancy->jobTitleCode = 2;
     $jobVacancy->name = "BA 2010";
     $jobVacancy->hiringManagerId = 2;
     $jobVacancy->noOfPositions = 2;
     $jobVacancy->description = "test";
     $jobVacancy->status = 1;
     $jobVacancy->definedTime = "2011-08-09 10:38:39";
     $jobVacancy->updatedTime = "2011-08-09 10:38:39";
     $result = $this->vacancyDao->saveJobVacancy($jobVacancy);
     $this->assertTrue($result);
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:18,代码来源:VacancyDaoTest.php

示例8: testSaveTimesheetActionLogWithNewTimesheetActionLog

 /**
  * Testing saveTimesheetActionLog mthod for newly made timesheet action logs
  */
 public function testSaveTimesheetActionLogWithNewTimesheetActionLog()
 {
     TestDataService::truncateSpecificTables(array('TimesheetActionLog'), true);
     $timesheetActionLog = new TimesheetActionLog();
     $timesheetActionLog->setTimesheetId(1);
     $timesheetActionLog->setDateTime('2011-04-23');
     $timesheetActionLog->setComment('New Timesheet Item');
     $timesheetActionLog->setAction('ACCEPTED');
     $timesheetActionLog->setPerformedBy('3');
     $savedNewTimesheetActionLog = $this->timesheetDao->saveTimesheetActionLog($timesheetActionLog);
     $this->assertTrue($savedNewTimesheetActionLog instanceof TimesheetActionLog);
     $this->assertEquals('001', $savedNewTimesheetActionLog->getTimesheetActionLogId());
     $this->assertEquals($timesheetActionLog->getTimesheetId(), $savedNewTimesheetActionLog->getTimesheetId());
     $this->assertEquals($timesheetActionLog->getDateTime(), $savedNewTimesheetActionLog->getDateTime());
     $this->assertEquals($timesheetActionLog->getComment(), $savedNewTimesheetActionLog->getComment());
     $this->assertEquals($timesheetActionLog->getAction(), $savedNewTimesheetActionLog->getAction());
     $this->assertEquals($timesheetActionLog->getPerformedBy(), $savedNewTimesheetActionLog->getPerformedBy());
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:21,代码来源:TimesheetDaoTest.php

示例9: testSaveCandidateAttachmentForNullId

 /**
  * 
  */
 public function testSaveCandidateAttachmentForNullId()
 {
     TestDataService::truncateSpecificTables(array('JobCandidateAttachment'));
     $file = tmpfile();
     fwrite($file, "writing to tempfile");
     fseek($file, 0);
     $resume = new JobCandidateAttachment();
     $resume->setId(null);
     $resume->setCandidateId(1);
     $resume->setFileName('xyz.txt');
     $resume->setFileType('.txt');
     $resume->setFileSize('512');
     $return = $this->recruitmentAttachmentDao->saveCandidateAttachment($resume);
     $this->assertTrue($return);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:18,代码来源:RecruitmentAttachmentDaoTest.php

示例10: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     $this->attendanceDao = new AttendanceDao();
     TestDataService::truncateSpecificTables(array('AttendanceRecord', 'Employee'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmAttendancePlugin/test/fixtures/AttendanceDao.yml');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:AttendanceDaoTest.php


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