From 03d6d201796ff8fe54eee249b5d930fee6a3cf35 Mon Sep 17 00:00:00 2001
From: Universal Omega <1010delta1010@gmail.com>
Date: Mon, 10 Oct 2022 16:01:40 +0000
Subject: [PATCH] tests: replace deprecated phpunit methods
Bug: T243600
Change-Id: Ib7bb66a1e853a413aa3cb02b45b2e7f5ef2e20e2
---
tests/phpunit/includes/HooksTest.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/phpunit/includes/HooksTest.php b/tests/phpunit/includes/HooksTest.php
index f8d5e4f..e675b72 100644
--- a/tests/phpunit/includes/HooksTest.php
+++ b/tests/phpunit/includes/HooksTest.php
@@ -76,13 +76,13 @@ class HooksTest extends MediaWikiLangTestCase {
}
if ( $expectedLink === false ) {
- $this->assertNotRegExp(
+ $this->assertDoesNotMatchRegularExpression(
'/]+href=[\'"]([^\'"]+)[\'"].+?>/',
$data,
'More information link should not be present'
);
} else {
- $this->assertRegExp(
+ $this->assertMatchesRegularExpression(
'/]+href=[\'"]' . preg_quote( $expectedLink, '/' ) . '[\'"].+?>/',
$data,
'More information link should be present and match the expectation'