本文整理汇总了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);
}
示例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';
}
示例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());
}
示例4: setUp
protected function setUp()
{
$this->leavePeriodService = new LeavePeriodService();
$leaveEntitlementService = new LeaveEntitlementService();
$leaveEntitlementService->setLeaveEntitlementStrategy(new FIFOEntitlementConsumptionStrategy());
$this->leavePeriodService->setLeaveEntitlementService($leaveEntitlementService);
TestDataService::truncateTables(array('LeavePeriodHistory'));
}
示例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();
}
示例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());
}
示例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);
}
示例8: testAddEmployee
public function testAddEmployee()
{
TestDataService::truncateTables(array('Employee'));
$employee = new Employee();
$employee->firstName = 'Tester';
$employee->lastName = 'Jason';
$employee = $this->employeeDao->saveEmployee($employee);
}
示例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();
}
示例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());
}
示例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');
}
示例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');
}
示例13: setUp
protected function setUp()
{
TestDataService::truncateTables(array('Kpi'));
TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmPerformancePlugin/test/fixtures/kpi.yml');
}
示例14: setUp
protected function setUp()
{
TestDataService::truncateTables(array('PerformanceReview', 'Employee'));
TestDataService::populate(sfConfig::get('sf_plugins_dir') . '/orangehrmPerformancePlugin/test/fixtures/performance_reviews.yml');
}
示例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);
}