Skip to content

Commit 13b2d36

Browse files
committed
refactor: remove version check PHP_VERSION_ID >= 80000
1 parent 07b0df0 commit 13b2d36

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

tests/system/Debug/TimerTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use ArgumentCountError;
1515
use CodeIgniter\Test\CIUnitTestCase;
16-
use ErrorException;
1716
use RuntimeException;
1817

1918
/**
@@ -172,11 +171,7 @@ public function testRecordThrowsException(): void
172171

173172
public function testRecordThrowsErrorOnCallableWithParams(): void
174173
{
175-
if (PHP_VERSION_ID >= 80000) {
176-
$this->expectException(ArgumentCountError::class);
177-
} else {
178-
$this->expectException(ErrorException::class);
179-
}
174+
$this->expectException(ArgumentCountError::class);
180175

181176
$timer = new Timer();
182177
$timer->record('error', 'strlen');

tests/system/Helpers/ArrayHelperTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace CodeIgniter\Helpers;
1313

1414
use CodeIgniter\Test\CIUnitTestCase;
15-
use ErrorException;
1615
use ValueError;
1716

1817
/**
@@ -303,13 +302,7 @@ public function testArraySortByMultipleKeysFailsEmptyParameter(array $data, arra
303302
*/
304303
public function testArraySortByMultipleKeysFailsInconsistentArraySizes($data): void
305304
{
306-
// PHP 8 changes this error type
307-
if (PHP_VERSION_ID >= 80000) {
308-
$this->expectException(ValueError::class);
309-
} else {
310-
$this->expectException(ErrorException::class);
311-
}
312-
305+
$this->expectException(ValueError::class);
313306
$this->expectExceptionMessage('Array sizes are inconsistent');
314307

315308
$sortColumns = [

0 commit comments

Comments
 (0)