diff --git a/tests/system/Debug/TimerTest.php b/tests/system/Debug/TimerTest.php index 54c9fdfccb18..2be069062d9c 100644 --- a/tests/system/Debug/TimerTest.php +++ b/tests/system/Debug/TimerTest.php @@ -13,7 +13,6 @@ use ArgumentCountError; use CodeIgniter\Test\CIUnitTestCase; -use ErrorException; use RuntimeException; /** @@ -172,11 +171,7 @@ public function testRecordThrowsException(): void public function testRecordThrowsErrorOnCallableWithParams(): void { - if (PHP_VERSION_ID >= 80000) { - $this->expectException(ArgumentCountError::class); - } else { - $this->expectException(ErrorException::class); - } + $this->expectException(ArgumentCountError::class); $timer = new Timer(); $timer->record('error', 'strlen'); diff --git a/tests/system/Helpers/ArrayHelperTest.php b/tests/system/Helpers/ArrayHelperTest.php index 4844fe84188e..2c4ce103adc9 100644 --- a/tests/system/Helpers/ArrayHelperTest.php +++ b/tests/system/Helpers/ArrayHelperTest.php @@ -12,7 +12,6 @@ namespace CodeIgniter\Helpers; use CodeIgniter\Test\CIUnitTestCase; -use ErrorException; use ValueError; /** @@ -303,13 +302,7 @@ public function testArraySortByMultipleKeysFailsEmptyParameter(array $data, arra */ public function testArraySortByMultipleKeysFailsInconsistentArraySizes($data): void { - // PHP 8 changes this error type - if (PHP_VERSION_ID >= 80000) { - $this->expectException(ValueError::class); - } else { - $this->expectException(ErrorException::class); - } - + $this->expectException(ValueError::class); $this->expectExceptionMessage('Array sizes are inconsistent'); $sortColumns = [