tests: replace deprecated phpunit methods

Bug: T243600
Change-Id: Ib7bb66a1e853a413aa3cb02b45b2e7f5ef2e20e2
This commit is contained in:
Universal Omega 2022-10-10 16:01:40 +00:00
parent 20b915ad0d
commit 03d6d20179

View file

@ -76,13 +76,13 @@ class HooksTest extends MediaWikiLangTestCase {
} }
if ( $expectedLink === false ) { if ( $expectedLink === false ) {
$this->assertNotRegExp( $this->assertDoesNotMatchRegularExpression(
'/<a[^>]+href=[\'"]([^\'"]+)[\'"].+?>/', '/<a[^>]+href=[\'"]([^\'"]+)[\'"].+?>/',
$data, $data,
'More information link should not be present' 'More information link should not be present'
); );
} else { } else {
$this->assertRegExp( $this->assertMatchesRegularExpression(
'/<a[^>]+href=[\'"]' . preg_quote( $expectedLink, '/' ) . '[\'"].+?>/', '/<a[^>]+href=[\'"]' . preg_quote( $expectedLink, '/' ) . '[\'"].+?>/',
$data, $data,
'More information link should be present and match the expectation' 'More information link should be present and match the expectation'