summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php')
-rw-r--r--www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php b/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php
index d4abad67..20b55c40 100644
--- a/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php
+++ b/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Integration/ResourcesTest.php
@@ -34,7 +34,15 @@ class ResourcesTest extends \PHPUnit_Framework_TestCase {
}
public function moduleDataProvider() {
- $resourceLoader = new ResourceLoader();
+
+ // #501
+ // MW 1.33+
+ if ( class_exists( '\MediaWiki\MediaWikiServices' ) && method_exists( '\MediaWiki\MediaWikiServices', 'getResourceLoader' ) ) {
+ $resourceLoader = \MediaWiki\MediaWikiServices::getInstance()->getResourceLoader();
+ } else {
+ $resourceLoader = new ResourceLoader();
+ }
+
$context = ResourceLoaderContext::newDummyContext();
$modules = $this->getSRFResourceModules();
@@ -70,4 +78,4 @@ class ResourcesTest extends \PHPUnit_Framework_TestCase {
}
}
-} \ No newline at end of file
+}