mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-27 15:40:16 +00:00
tests: replace deprecated phpunit methods
Bug: T243600 Change-Id: Ib7bb66a1e853a413aa3cb02b45b2e7f5ef2e20e2
This commit is contained in:
parent
20b915ad0d
commit
03d6d20179
|
@ -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'
|
||||||
|
|
Loading…
Reference in a new issue