Skip to content

Commit

Permalink
Revert "Update ResourcesTest.php"
Browse files Browse the repository at this point in the history
This reverts commit 35e586e.

Uhhh, i'm so sorry.
  • Loading branch information
paladox committed Dec 27, 2024
1 parent 35e586e commit 7c313f2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/phpunit/Integration/ResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace SRF\Tests\Integration;

use MediaWiki\MediaWikiServices;
use ResourceLoader;
use ResourceLoaderContext;

Expand Down Expand Up @@ -34,7 +33,13 @@ private function getSRFResourceModules() {
}

public function moduleDataProvider() {
$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
// #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();
Expand Down

0 comments on commit 7c313f2

Please sign in to comment.