We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46a715f commit ae3620dCopy full SHA for ae3620d
1 file changed
tests/Jobs/PlatformStatsSummaryJobTest.php
@@ -298,6 +298,11 @@ public function testPrepareStatsTreatsSecondPrecisionTimestampAtThresholdAsActiv
298
]);
299
300
$job = new PlatformStatsSummaryJob;
301
+
302
+ // This is a hack to override the `private` `PlatformStatsSummaryJob::mwHostResolver` property.
303
+ // See https://www.php.net/manual/en/closure.call.php for more details on how this works.
304
+ // TODO: figure out how to stub the `DatabaseManager` correctly and/or refactor the Job so that
305
+ // we can more easily inject dependencies in the tests.
306
(function ($resolver): void {
307
$this->mwHostResolver = $resolver;
308
})->call($job, $this->mockMwHostResolver);
0 commit comments