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


PHP TestDataService::loadObjectList方法代码示例

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


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

示例1: testSanitizeNotificationSection

 public function testSanitizeNotificationSection()
 {
     $notifications = TestDataService::loadObjectList('BeaconNotification', $this->fixture, 'BeaconNotification');
     $notificationXML = new SimpleXMLElement($notifications[0]->getDefinition());
     $sanitizedBody = $this->beaconNotificationService->sanitizeNotificationSection($notificationXML->content->body . "");
     $this->assertTrue(substr_count($sanitizedBody, '<script>') == 0);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:7,代码来源:BeaconNotificationServiceTest.php

示例2: testGetAllCustomers

 public function testGetAllCustomers()
 {
     $customerList = TestDataService::loadObjectList('Customer', $this->fixture, 'Customer');
     $customerDao = $this->getMock('CustomerDao');
     $customerDao->expects($this->once())->method('getAllCustomers')->with(false)->will($this->returnValue($customerList));
     $this->customerService->setCustomerDao($customerDao);
     $result = $this->customerService->getAllCustomers(false);
     $this->assertEquals($result, $customerList);
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:9,代码来源:CustomerServiceTest.php

示例3: testGtJobCategoryById

 public function testGtJobCategoryById()
 {
     $jobCatList = TestDataService::loadObjectList('JobCategory', $this->fixture, 'JobCategory');
     $jobCatDao = $this->getMock('JobCategoryDao');
     $jobCatDao->expects($this->once())->method('getJobCategoryById')->with(1)->will($this->returnValue($jobCatList[0]));
     $this->jobCatService->setJobCategoryDao($jobCatDao);
     $result = $this->jobCatService->getJobCategoryById(1);
     $this->assertEquals($result, $jobCatList[0]);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:JobCategoryServiceTest.php

示例4: testGetJobTitleById

 public function testGetJobTitleById()
 {
     $jobTitleList = TestDataService::loadObjectList('JobTitle', $this->fixture, 'JobTitle');
     $jobTitleDao = $this->getMock('JobTitleDao');
     $jobTitleDao->expects($this->once())->method('getJobTitleById')->with(1)->will($this->returnValue($jobTitleList[0]));
     $this->JobTitleService->setJobTitleDao($jobTitleDao);
     $result = $this->JobTitleService->getJobTitleById(1);
     $this->assertEquals($jobTitleList[0], $result);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:JobTitleServiceTest.php

示例5: testUpdateWorkShift

 public function testUpdateWorkShift()
 {
     $workShiftList = TestDataService::loadObjectList('WorkShift', $this->fixture, 'WorkShift');
     $workShiftDao = $this->getMock('WorkShiftDao');
     $workShiftDao->expects($this->once())->method('updateWorkShift')->with($workShiftList[0])->will($this->returnValue(true));
     $this->workShiftService->setWorkShiftDao($workShiftDao);
     $result = $this->workShiftService->updateWorkShift($workShiftList[0]);
     $this->assertTrue($result);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:WorkShiftServiceTest.php

示例6: testGetValue

 /**
  * Testing getValue()
  */
 public function testGetValue()
 {
     // Test values in fixtures.yml
     $fixtureObjects = TestDataService::loadObjectList('Config', $this->fixture, 'Config');
     foreach ($fixtureObjects as $config) {
         $value = $this->configDao->getValue($config->key);
         $this->assertEquals($config->value, $value);
     }
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:12,代码来源:ConfigDaoTest.php

示例7: testGetMembershipById

 public function testGetMembershipById()
 {
     $membershipList = TestDataService::loadObjectList('Membership', $this->fixture, 'Membership');
     $membershipDao = $this->getMock('MembershipDao');
     $membershipDao->expects($this->once())->method('getMembershipById')->with(1)->will($this->returnValue($membershipList[0]));
     $this->membershipService->setMembershipDao($membershipDao);
     $result = $this->membershipService->getMembershipById(1);
     $this->assertEquals($result, $membershipList[0]);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:MembershipServiceTest.php

示例8: testGetNationalityById

 public function testGetNationalityById()
 {
     $nationalityList = TestDataService::loadObjectList('Nationality', $this->fixture, 'Nationality');
     $nationalityDao = $this->getMock('NationalityDao');
     $nationalityDao->expects($this->once())->method('getNationalityById')->with(1)->will($this->returnValue($nationalityList[0]));
     $this->nationalityService->setNationalityDao($nationalityDao);
     $result = $this->nationalityService->getNationalityById(1);
     $this->assertEquals($result, $nationalityList[0]);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:NationalityServiceTest.php

示例9: testGetEmploymentStatusById

 public function testGetEmploymentStatusById()
 {
     $empStatusList = TestDataService::loadObjectList('EmploymentStatus', $this->fixture, 'EmploymentStatus');
     $empStatusDao = $this->getMock('EmploymentStatusDao');
     $empStatusDao->expects($this->once())->method('getEmploymentStatusById')->with(1)->will($this->returnValue($empStatusList[0]));
     $this->empStatService->setEmploymentStatusDao($empStatusDao);
     $result = $this->empStatService->getEmploymentStatusById(1);
     $this->assertEquals($result, $empStatusList[0]);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:EmploymentStatusServiceTest.php

示例10: testAddSubunit

 public function testAddSubunit()
 {
     $subunitList = TestDataService::loadObjectList('Subunit', $this->fixture, 'Subunit');
     $subunit = $subunitList[2];
     $parentSubunit = new Subunit();
     $parentSubunit->setName("New Department");
     $this->assertTrue($this->companyStructureDao->addSubunit($parentSubunit, $subunit));
     $this->assertNotNull($parentSubunit->getId());
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:CompanyStructureDaoTest.php

示例11: testGetLocationList

 public function testGetLocationList()
 {
     $locationList = TestDataService::loadObjectList('Location', $this->fixture, 'Location');
     $locationDao = $this->getMock('LocationDao');
     $locationDao->expects($this->once())->method('getLocationList')->will($this->returnValue($locationList));
     $this->locationService->setLocationDao($locationDao);
     $result = $this->locationService->getLocationList();
     $this->assertEquals($result, $locationList);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:9,代码来源:LocationServiceTest.php

示例12: testSavePunchAction

 /**
  * @group orangehrmAttendancePlugin
  */
 public function testSavePunchAction()
 {
     $attendanceRecords = TestDataService::loadObjectList('AttendanceRecord', $this->fixture, 'AttendanceRecord');
     $attendanceRecord = $attendanceRecords[0];
     $attendanceDaoMock = $this->getMock('AttendanceDao', array('savePunchRecord'));
     $attendanceDaoMock->expects($this->once())->method('savePunchRecord')->with($attendanceRecord)->will($this->returnValue($attendanceRecord));
     $this->attendanceService->setAttendanceDao($attendanceDaoMock);
     $this->assertTrue($this->attendanceService->savePunchRecord($attendanceRecord) instanceof AttendanceRecord);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:12,代码来源:AttendanceServiceTest.php

示例13: testReadWorkWeek

 public function testReadWorkWeek()
 {
     $workWeekList = TestDataService::loadObjectList('WorkWeek', $this->fixture, 'WorkWeek');
     $workWeekDao = $this->getMock('WorkWeekDao', array('readWorkWeek'));
     $workWeekDao->expects($this->once())->method('readWorkWeek')->with(1)->will($this->returnValue($workWeekList[0]));
     $this->workWeekService->setWorkWeekDao($workWeekDao);
     $readWorkWeek = $this->workWeekService->readWorkWeek(1);
     $this->assertTrue($readWorkWeek instanceof WorkWeek);
     $this->assertEquals($workWeekList[0], $readWorkWeek);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:10,代码来源:WorkWeekServiceTest.php

示例14: testReadLeaveType

 public function testReadLeaveType()
 {
     $leaveTypeList = TestDataService::loadObjectList('LeaveType', $this->fixture, 'set1');
     $leaveType = $leaveTypeList[0];
     $leaveTypeDao = $this->getMock('LeaveTypeDao', array('readLeaveType'));
     $leaveTypeDao->expects($this->once())->method('readLeaveType')->with('LTY001')->will($this->returnValue($leaveType));
     $this->leaveTypeService->setLeaveTypeDao($leaveTypeDao);
     $leaveType = $this->leaveTypeService->readLeaveType('LTY001');
     $this->assertTrue($leaveType instanceof LeaveType);
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:10,代码来源:LeaveTypeServiceTest.php

示例15: testGetAllValues

 public function testGetAllValues()
 {
     $result = $this->configDao->getAllValues();
     // Test values in fixtures.yml
     $fixtureObjects = TestDataService::loadObjectList('Config', $this->fixture, 'Config');
     foreach ($fixtureObjects as $config) {
         $this->assertTrue(isset($result[$config->key]));
         $this->assertEquals($config->value, $result[$config->key]);
     }
     $this->assertEquals(count($fixtureObjects), count($result));
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:11,代码来源:ConfigDaoTest.php


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