Skip to content

Commit dbebef9

Browse files
committed
assertRegExp() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertMatchesRegularExpression() instead.
1 parent aac5dd5 commit dbebef9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/CoreErrorLoggerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function testStdClass(): void
315315
self::assertStringContainsString('<html ', $output);
316316
self::assertStringContainsString('</html>', $output);
317317

318-
self::assertRegExp('/th.*foo.*th.*td.*barbar.*td/', $output);
318+
self::assertMatchesRegularExpression('/th.*foo.*th.*td.*barbar.*td/', $output);
319319
}
320320

321321
//--------------------------------------------------------------------------------------------------------------------
@@ -351,9 +351,9 @@ private function defaultAssertions(string $output): void
351351
self::assertStringContainsString('<html ', $output);
352352
self::assertStringContainsString('</html>', $output);
353353

354-
self::assertRegExp('|<p class="file">.*/test/TestClassB\.php\(\d+\)</p>|', $output);
355-
self::assertRegExp('|<span class="file">.*/test/TestClassA\.php\(\d+\):</span>|', $output);
356-
self::assertRegExp('|<span class="file">.*/test/CoreErrorLoggerTest.php\(\d+\):</span>|', $output);
354+
self::assertMatchesRegularExpression('|<p class="file">.*/test/TestClassB\.php\(\d+\)</p>|', $output);
355+
self::assertMatchesRegularExpression('|<span class="file">.*/test/TestClassA\.php\(\d+\):</span>|', $output);
356+
self::assertMatchesRegularExpression('|<span class="file">.*/test/CoreErrorLoggerTest.php\(\d+\):</span>|', $output);
357357
}
358358

359359
//--------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)