Hygiene: Replace QuickTemplate test subclass with mock
Change-Id: I32aa9d5103f4b6790a5118d5cad2cd91d3ddc459
This commit is contained in:
parent
f2048cd92d
commit
d5145178b9
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue