diff options
author | Timo Tijhof <krinkle@fastmail.com> | 2024-03-09 20:19:59 +0000 |
---|---|---|
committer | mainframe98 <k.s.werf@hotmail.com> | 2024-03-11 19:39:24 +0100 |
commit | 3903c8cfecce85937eb74d163666f02b5d949a3e (patch) | |
tree | c7896285e0251d7bada012c65cc21077b7442c6f /tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php | |
parent | c97b33d259ec8aa34167928c2ca189f344c8715d (diff) | |
download | mediawikicore-3903c8cfecce85937eb74d163666f02b5d949a3e.tar.gz mediawikicore-3903c8cfecce85937eb74d163666f02b5d949a3e.zip |
ResourceLoader: Migrate wfGetDB call to ICP and move to WikiModule
* Remove references to IDatabase from preloadModuleInfo() and with
it the last reference to Rdbms in the ResourceLoader service
(progressing T32956).
* Simplify WikiModule::preloadTitleInfo() so that it doesn't need
an IDatabase object unless
1) there are non-zero WikiModule objects in the batch, and
2) there is a cache miss.
* Remove needless IDatabase parameters passed or mocked for this
method. Note that WikiModule already had `@group Database` set
since each WikiModule::getDB() is called and uses an unmocked
database. The mocked database was only injected to satisfy the
method signature.
Bug: T32956
Bug: T359522
Change-Id: I022f02d6e6bbae46c3258a7c07a1d6723506d8bc
Diffstat (limited to 'tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php')
-rw-r--r-- | tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php b/tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php index ed2624e7f388..99123adc38de 100644 --- a/tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php +++ b/tests/phpunit/includes/ResourceLoader/StartUpModuleTest.php @@ -6,7 +6,6 @@ use Exception; use MediaWiki\ResourceLoader\Module; use MediaWiki\ResourceLoader\StartUpModule; use Psr\Log\NullLogger; -use Wikimedia\Rdbms\ILoadBalancer; /** * @group ResourceLoader @@ -14,11 +13,6 @@ use Wikimedia\Rdbms\ILoadBalancer; */ class StartUpModuleTest extends ResourceLoaderTestCase { - protected function setUp(): void { - parent::setUp(); - $this->setService( 'DBLoadBalancer', $this->createMock( ILoadBalancer::class ) ); - } - protected static function expandPlaceholders( $text ) { return strtr( $text, [ '{blankVer}' => self::BLANK_VERSION |