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


PHP TestDataService::truncateTables方法代码示例

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


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

示例1: setUp

 protected function setUp()
 {
     $this->dao = new OpenIdProviderDao();
     $fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmOpenidAuthenticationPlugin/test/fixtures/openiduser.yml';
     TestDataService::truncateTables(array('OpenidProvider'));
     TestDataService::populate($fixture);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:7,代码来源:OpenIdProviderDaoTest.php

示例2: setUp

 protected function setUp()
 {
     $this->reportableService = new ReportableService();
     TestDataService::truncateTables(array('Report', 'ReportGroup'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/ReportableService.yml');
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/ReportableService.yml';
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:7,代码来源:ReportableServiceTest.php

示例3: testSaveLeaveTypeCheckSavedType

 public function testSaveLeaveTypeCheckSavedType()
 {
     TestDataService::truncateTables(array('LeaveType'));
     $this->leaveTypeDao->saveLeaveType($this->_getLeaveTypeObjectWithValues());
     $savedLeaveTypes = TestDataService::fetchLastInsertedRecords('LeaveType', 1);
     $this->assertEquals('LTY001', $savedLeaveTypes[0]->getLeaveTypeId());
     $this->assertEquals('Special', $savedLeaveTypes[0]->getLeaveTypeName());
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:8,代码来源:LeaveTypeDaoTest.php

示例4: setUp

 protected function setUp()
 {
     $this->leavePeriodService = new LeavePeriodService();
     $leaveEntitlementService = new LeaveEntitlementService();
     $leaveEntitlementService->setLeaveEntitlementStrategy(new FIFOEntitlementConsumptionStrategy());
     $this->leavePeriodService->setLeaveEntitlementService($leaveEntitlementService);
     TestDataService::truncateTables(array('LeavePeriodHistory'));
 }
开发者ID:CamilleCrespeau,项目名称:orangehrm,代码行数:8,代码来源:LeavePeriodHistoryServiceTest.php

示例5: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     TestDataService::truncateTables(array('ModuleDefaultPage', 'HomePage', 'UserRole', 'Module'));
     $this->fixture = sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/HomePageDao.yml';
     $this->testData = sfYaml::load($this->fixture);
     TestDataService::populate($this->fixture);
     $this->homePageDao = new HomePageDao();
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:11,代码来源:HomePageDaoTest.php

示例6: testSaveLeavePeriodWithNoId

 public function testSaveLeavePeriodWithNoId()
 {
     TestDataService::truncateTables(array('LeavePeriod'));
     $leavePeriod = new LeavePeriod();
     $leavePeriod->setStartDate("2010-01-31");
     $leavePeriod->setEndDate("2011-01-31");
     $this->assertTrue($this->leavePeriodDao->saveLeavePeriod($leavePeriod));
     $savedLeavePeriod = TestDataService::fetchObject('LeavePeriod', 1);
     $this->assertEquals($leavePeriod->getLeavePeriodId(), $savedLeavePeriod->getLeavePeriodId());
     $this->assertEquals($leavePeriod->getStartDate(), $savedLeavePeriod->getStartDate());
     $this->assertEquals($leavePeriod->getEndDate(), $savedLeavePeriod->getEndDate());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:12,代码来源:LeavePeriodDaoTest.php

示例7: testSaveCandidateForNullId

 public function testSaveCandidateForNullId()
 {
     TestDataService::truncateTables(array('JobCandidate'));
     $candidate = new JobCandidate();
     $candidate->id = null;
     $candidate->firstName = "Yasitha";
     $candidate->middleName = "Chathuranga";
     $candidate->lastName = "Pandithawatta";
     $candidate->email = "yasitha@gmail.com";
     $candidate->comment = "ok";
     $candidate->contactNumber = "0777777777";
     $candidate->keywords = "php,java";
     $candidate->dateOfApplication = "2011-07-04";
     $candidate->status = 1;
     $candidate->modeOfApplication = 1;
     $return = $this->candidateDao->saveCandidate($candidate);
     $this->assertTrue($return);
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:18,代码来源:CandidateDaoTest.php

示例8: testAddEmployee

 public function testAddEmployee()
 {
     TestDataService::truncateTables(array('Employee'));
     $employee = new Employee();
     $employee->firstName = 'Tester';
     $employee->lastName = 'Jason';
     $employee = $this->employeeDao->saveEmployee($employee);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:8,代码来源:EmployeeDaoTest.php

示例9: setUp

 protected function setUp()
 {
     TestDataService::truncateTables(array('Config'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmTimePlugin/test/fixtures/MonthlyTimesheetPeriod.yml');
     $this->monthlyTimesheetPeriod = new MonthlyTImesheetPeriod();
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:6,代码来源:MonthlyTimesheetPeriodTest.php

示例10: testSaveTimesheetItemWithNewTimesheetItem

 /**
  * Testing saveTimesheetItem method for the newly made timesheet Items
  */
 public function testSaveTimesheetItemWithNewTimesheetItem()
 {
     TestDataService::truncateTables(array('TimesheetItem'));
     $timesheetItem = new TimesheetItem();
     $timesheetItem->setTimesheetId(1);
     $timesheetItem->setDate("2011-04-23");
     $timesheetItem->setDuration("5700");
     $timesheetItem->setComment("New Timesheet Item");
     $timesheetItem->setProjectId(1);
     $timesheetItem->setEmployeeId(1);
     $timesheetItem->setActivityId(4);
     $savedNewTimesheetItem = $this->timesheetDao->saveTimesheetItem($timesheetItem);
     $this->assertTrue($savedNewTimesheetItem instanceof TimesheetItem);
     $this->assertEquals('001', $savedNewTimesheetItem->getTimesheetItemId());
     $this->assertEquals($timesheetItem->getTimesheetId(), $savedNewTimesheetItem->getTimesheetId());
     $this->assertEquals($timesheetItem->getDate(), $savedNewTimesheetItem->getDate());
     $this->assertEquals($timesheetItem->getDuration(), $savedNewTimesheetItem->getDuration());
     $this->assertEquals($timesheetItem->getComment(), $savedNewTimesheetItem->getComment());
     $this->assertEquals($timesheetItem->getProjectId(), $savedNewTimesheetItem->getProjectId());
     $this->assertEquals($timesheetItem->getEmployeeId(), $savedNewTimesheetItem->getEmployeeId());
     $this->assertEquals($timesheetItem->getActivityId(), $savedNewTimesheetItem->getActivityId());
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:25,代码来源:TimesheetDaoTest.php

示例11: setUp

 /**
  * Set up method
  */
 protected function setUp()
 {
     TestDataService::truncateTables(array('Employee', 'LeaveType', 'LeavePeriod', 'Leave'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmCoreLeavePlugin/test/fixtures/LeaveRequestDaoSearch.yml');
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:8,代码来源:LeaveRequestDaoSearchTest.php

示例12: setUp

 protected function setUp()
 {
     $this->reportableDao = new ReportableDao();
     TestDataService::truncateTables(array('SelectedCompositeDisplayField', 'CompositeDisplayField', 'DisplayField', 'SelectedGroupField', 'GroupField', 'SelectedDisplayField', 'SelectedFilterField', 'FilterField', 'Report', 'ReportGroup', 'ProjectActivity', 'Project', 'Customer'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmCorePlugin/test/fixtures/ReportableDao.yml');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:6,代码来源:ReportableDaoTest.php

示例13: setUp

 protected function setUp()
 {
     TestDataService::truncateTables(array('Kpi'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmPerformancePlugin/test/fixtures/kpi.yml');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:5,代码来源:KpiDaoTest.php

示例14: setUp

 protected function setUp()
 {
     TestDataService::truncateTables(array('PerformanceReview', 'Employee'));
     TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmPerformancePlugin/test/fixtures/performance_reviews.yml');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:5,代码来源:PerforamanceReviewDaoTest.php

示例15: testSaveJobInterviewForNullId

 public function testSaveJobInterviewForNullId()
 {
     TestDataService::truncateTables(array('JobInterview', 'JobInterviewInterviewer', 'JobInterviewAttachment'));
     $interview = new JobInterview();
     $interview->setId(null);
     $interview->setInterviewName('1st Interview');
     $interview->setInterviewDate('2011-05-05');
     $return = $this->jobInterviewDao->saveJobInterview($interview);
     $this->assertTrue($return);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:10,代码来源:JobInterviewDaoTest.php


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