mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-27 15:40:16 +00:00
Unbreak tests
Use an anonymous class to implement QuickTemplate instead of relying on a specific implementation that no longer exists. Change-Id: Ifbd47e6fa3aff8c1969e8510edbfd16507025ed2
This commit is contained in:
parent
ab49b3b403
commit
2729a661c3
|
@ -10,6 +10,7 @@ use FauxRequest;
|
|||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Revision\SlotRecord;
|
||||
use MediaWikiLangTestCase;
|
||||
use QuickTemplate;
|
||||
use RequestContext;
|
||||
use SkinTemplate;
|
||||
use Title;
|
||||
|
@ -52,7 +53,10 @@ class HooksTest extends MediaWikiLangTestCase {
|
|||
$pageUpdater->saveRevision( CommentStoreComment::newUnsavedComment( 'CookieWarning test' ) );
|
||||
}
|
||||
$sk = new SkinTemplate();
|
||||
$tpl = new \SkinFallbackTemplate();
|
||||
$tpl = new class extends QuickTemplate {
|
||||
public function execute() {
|
||||
}
|
||||
};
|
||||
Hooks::onSkinTemplateOutputPageBeforeExec( $sk, $tpl );
|
||||
$headElement = '';
|
||||
if ( isset( $tpl->data['headelement'] ) ) {
|
||||
|
@ -158,7 +162,10 @@ class HooksTest extends MediaWikiLangTestCase {
|
|||
$context->setRequest( $request );
|
||||
$sk = new SkinTemplate();
|
||||
$sk->setContext( $context );
|
||||
$tpl = new \SkinFallbackTemplate();
|
||||
$tpl = new class extends QuickTemplate {
|
||||
public function execute() {
|
||||
}
|
||||
};
|
||||
Hooks::onSkinTemplateOutputPageBeforeExec( $sk, $tpl );
|
||||
|
||||
$this->assertEquals(
|
||||
|
|
Loading…
Reference in a new issue