From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- tests/phpunit/ResourceLoaderTestCase.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'tests/phpunit/ResourceLoaderTestCase.php') diff --git a/tests/phpunit/ResourceLoaderTestCase.php b/tests/phpunit/ResourceLoaderTestCase.php index f5f302e0..deecb31e 100644 --- a/tests/phpunit/ResourceLoaderTestCase.php +++ b/tests/phpunit/ResourceLoaderTestCase.php @@ -1,7 +1,12 @@ $lang, @@ -10,7 +15,14 @@ abstract class ResourceLoaderTestCase extends MediaWikiTestCase { 'skin' => 'vector', 'target' => 'test', ) ); - return new ResourceLoaderContext( $resourceLoader, $request ); + $ctx = $this->getMockBuilder( 'ResourceLoaderContext' ) + ->setConstructorArgs( array( $resourceLoader, $request ) ) + ->setMethods( array( 'getDirection' ) ) + ->getMock(); + $ctx->expects( $this->any() )->method( 'getDirection' )->will( + $this->returnValue( $dir ) + ); + return $ctx; } protected function setUp() { @@ -86,10 +98,3 @@ class ResourceLoaderTestModule extends ResourceLoaderModule { class ResourceLoaderFileModuleTestModule extends ResourceLoaderFileModule { } - -class ResourceLoaderWikiModuleTestModule extends ResourceLoaderWikiModule { - // Override expected via PHPUnit mocks and stubs - protected function getPages( ResourceLoaderContext $context ) { - return array(); - } -} -- cgit v1.2.3-54-g00ecf