diff --git a/src/plugins/orangehrmAttendancePlugin/test/Api/TimezonesAPITest.php b/src/plugins/orangehrmAttendancePlugin/test/Api/TimezonesAPITest.php index 2d77050152..0223b603e3 100644 --- a/src/plugins/orangehrmAttendancePlugin/test/Api/TimezonesAPITest.php +++ b/src/plugins/orangehrmAttendancePlugin/test/Api/TimezonesAPITest.php @@ -41,8 +41,16 @@ public function testGetAll(TestCaseParams $testCaseParams): void public function dataProviderForTestGetAll(): array { $phpVersion = phpversion(); + $testCases = $this->getTestCases('TimezonesAPITestCases.yaml', 'GetAll'); if (version_compare($phpVersion, '7.4.29', '>=')) { - return $this->getTestCases('TimezonesAPITestCasesForSpecificVersion.yaml', 'GetAll'); + $testCase = &$testCases["Get Timezones by filter(ESS) - tok"][0]; + $modifiedTimeZone = [ + "name" => "Antarctica/Vostok", + "label" => "+07:00", + "offset" => "7.0" + ]; + $testCase->setResultData($modifiedTimeZone); + return $testCases; } else { return $this->getTestCases('TimezonesAPITestCases.yaml', 'GetAll'); } diff --git a/src/plugins/orangehrmAttendancePlugin/test/fixtures/testcases/TimezonesAPITestCasesForSpecificVersion.yaml b/src/plugins/orangehrmAttendancePlugin/test/fixtures/testcases/TimezonesAPITestCasesForSpecificVersion.yaml deleted file mode 100644 index 98e7c50f63..0000000000 --- a/src/plugins/orangehrmAttendancePlugin/test/fixtures/testcases/TimezonesAPITestCasesForSpecificVersion.yaml +++ /dev/null @@ -1,19 +0,0 @@ -GetAll: - 'Get Timezones by filter(ESS) - tok - updated': - userId: 2 - now: - datetime: '2022-03-01' - query: - timezoneName: 'tok' - data: - - name: 'Antarctica/Vostok' - label : '+07:00' - offset : '7.0' - - name: 'Asia/Tokyo' - label: "+09:00" - offset: '9.0' - - name: 'Asia/Vladivostok' - label: "+10:00" - offset: '10.0' - meta: - total: 3