Hygiene: Replace QuickTemplate test subclass with mock

Change-Id: I32aa9d5103f4b6790a5118d5cad2cd91d3ddc459
This commit is contained in:
Timo Tijhof 2018-02-02 17:27:28 -08:00 committed by Krinkle
parent f2048cd92d
commit d5145178b9
1 changed files with 3 additions and 6 deletions

View File

@ -14,11 +14,6 @@ use Title;
use User;
use Wikimedia\TestingAccessWrapper;
class Template extends QuickTemplate {
public function execute() {
}
}
class EchoNotifUser {
public function __construct(
$lastUnreadAlertTime, $lastUnreadMessageTime, $echoNotificationCount
@ -268,7 +263,9 @@ class SkinMinervaTest extends MediaWikiTestCase {
->method( 'getFormattedEchoNotificationCount' )
->will( $this->returnValue( $formattedEchoNotificationCount ) );
$tpl = new Template();
$tpl = $this->getMockBuilder( QuickTemplate::class )
->setMethods( [ 'execute' ] )
->getMock();
$skin->prepareUserButton( $tpl );
$this->assertEquals(
$expectedSecondaryButtonData,