diff --git a/tests/php/Dev/BacktraceTest.php b/tests/php/Dev/BacktraceTest.php index 2435ab5c8b4..682c12018ec 100644 --- a/tests/php/Dev/BacktraceTest.php +++ b/tests/php/Dev/BacktraceTest.php @@ -161,7 +161,7 @@ public static function matchesFilterableClassProvider(): array #[DataProvider('matchesFilterableClassProvider')] public function testMatchesFilterableClass(string $className, string $filterableClass, bool $expected, string $message): void { - $reflectionMethod = new ReflectionMethod(Backtrace::class . '::matchesFilterableClass'); + $reflectionMethod = new ReflectionMethod(Backtrace::class, 'matchesFilterableClass'); $reflectionMethod->setAccessible(true); $this->assertSame($expected, $reflectionMethod->invoke(null, $className, $filterableClass), $message); } diff --git a/tests/php/Dev/CsvBulkLoaderTest.php b/tests/php/Dev/CsvBulkLoaderTest.php index 8f5d84834c4..8d1a5fb69db 100644 --- a/tests/php/Dev/CsvBulkLoaderTest.php +++ b/tests/php/Dev/CsvBulkLoaderTest.php @@ -57,8 +57,8 @@ public function testLoad() $filepath = $this->csvPath . 'PlayersWithHeader.csv'; $file = fopen($filepath ?? '', 'r'); $compareCount = $this->getLineCount($file); - fgetcsv($file); // pop header row - $compareRow = fgetcsv($file); + fgetcsv($file, escape: "\\"); // pop header row + $compareRow = fgetcsv($file, escape: "\\"); $results = $loader->load($filepath); // Test that right amount of columns was imported @@ -141,7 +141,7 @@ public function testLoadWithColumnMap() $filepath = $this->csvPath . 'Players.csv'; $file = fopen($filepath ?? '', 'r'); $compareCount = $this->getLineCount($file); - $compareRow = fgetcsv($file); + $compareRow = fgetcsv($file, escape: "\\"); $loader->columnMap = [ 'FirstName', 'Biography', @@ -188,8 +188,8 @@ public function testLoadWithCustomHeaderAndRelation() $filepath = $this->csvPath . 'PlayersWithCustomHeaderAndRelation.csv'; $file = fopen($filepath ?? '', 'r'); $compareCount = $this->getLineCount($file); - fgetcsv($file); // pop header row - $compareRow = fgetcsv($file); + fgetcsv($file, escape: "\\"); // pop header row + $compareRow = fgetcsv($file, escape: "\\"); $loader->columnMap = [ 'first name' => 'FirstName', 'bio' => 'Biography', diff --git a/tests/php/Dev/SapphireTestTest.php b/tests/php/Dev/SapphireTestTest.php index cee251278ab..7074dd52dd9 100644 --- a/tests/php/Dev/SapphireTestTest.php +++ b/tests/php/Dev/SapphireTestTest.php @@ -9,7 +9,6 @@ use SilverStripe\Security\Permission; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\DataProviderExternal; -use SilverStripe\Dev\Exceptions\ExpectedErrorException; use SilverStripe\Dev\Exceptions\ExpectedNoticeException; use SilverStripe\Dev\Exceptions\ExpectedWarningException; @@ -271,11 +270,8 @@ public function testEnableErrorHandler(int $errno, ?string $expectedClass): void public static function provideEnableErrorHandler(): array { // Only E_USER_* errors can be triggered, so that's all that's being tested + // As of PHP 8.4, E_USER_ERROR can no longer be triggered without a PHP deprecation notice return [ - 'error' => [ - 'errno' => E_USER_ERROR, - 'expectedClass' => ExpectedErrorException::class, - ], 'notice' => [ 'errno' => E_USER_NOTICE, 'expectedClass' => ExpectedNoticeException::class,