mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 13:56:53 +00:00
Fix tests
Change-Id: I761c8eea6c0ecc55f02ce86259c5afc83d6a96a9
This commit is contained in:
parent
b8686223e5
commit
828d31625c
|
@ -57,6 +57,9 @@ class CookieWarningHooks {
|
|||
);
|
||||
}
|
||||
|
||||
if ( !isset( $tpl->data['headelement'] ) ) {
|
||||
$tpl->data['headelement'] = '';
|
||||
}
|
||||
$tpl->data['headelement'] .= Html::openElement(
|
||||
'div',
|
||||
array( 'class' => 'mw-cookiewarning-container' )
|
||||
|
|
|
@ -43,7 +43,7 @@ class CookieWarningHooksTest extends MediaWikiLangTestCase {
|
|||
// @codingStandardsIgnoreStart Generic.Files.LineLength
|
||||
$expected =
|
||||
str_replace( '$1', $expectedLink,
|
||||
'<div class="mw-cookiewarning-container"><div class="mw-cookiewarning-text"><span>Cookies help us deliver our services. By using our services, you agree to our use of cookies.</span>$1<a class="mw-cookiewarning-dismiss">OK</a></div></div>' );
|
||||
'<div class="mw-cookiewarning-container"><div class="mw-cookiewarning-text"><span>Cookies help us deliver our services. By using our services, you agree to our use of cookies.</span>$1<form method="POST"><input name="disablecookiewarning" class="mw-cookiewarning-dismiss" type="submit" value="OK"/></form></div></div>' );
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
$this->assertEquals( $expected, $headElement );
|
||||
|
@ -121,4 +121,4 @@ class CookieWarningTestTemplate extends BaseTemplate {
|
|||
public function execute() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue