Fix failing SkinMinerva unit test

Bug: T170624
Change-Id: I13fff8eba06abad43291e481f32d9eb30c0f031b
This commit is contained in:
Piotr Miazga 2017-07-17 22:34:47 +02:00
parent 9d90df7b0b
commit d5461f55a1

View file

@ -33,7 +33,7 @@ class EchoNotifUser {
} }
/** /**
* @coversDefaultClass SkinMinerva * @coversDefaultClass SkinMinerva
* @group MobileFrontend * @group MobileFrontend
*/ */
class SkinMinervaTest extends MediaWikiTestCase { class SkinMinervaTest extends MediaWikiTestCase {
@ -170,12 +170,7 @@ class SkinMinervaTest extends MediaWikiTestCase {
public function testGetContextSpecificModules( $fontchangerValue, $backToTopValue, public function testGetContextSpecificModules( $fontchangerValue, $backToTopValue,
$moduleName, $expected $moduleName, $expected
) { ) {
$skin = TestingAccessWrapper::newFromObject( $skin = new SkinMinerva();
$this->getMockBuilder( SkinMinerva::class )
->disableOriginalConstructor()
->setMethods( [ 'getTitle' ] )
->getMock()
);
$title = Title::newFromText( 'Test' ); $title = Title::newFromText( 'Test' );
$testContext = RequestContext::getMain(); $testContext = RequestContext::getMain();
$testContext->setTitle( $title ); $testContext->setTitle( $title );