X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fchanges%2FRecentChangeTest.php;h=68f907958fd052f3294348a1a9e9bf24c5e841ed;hp=2efc802cdab5ed5024da6df7bf32b8b770fb9784;hb=e27ed2f3781dc7ffd6702af0be4551e799806d2d;hpb=42b7a3bc8213ab219b47e24102d042b0c60c71e4 diff --git a/tests/phpunit/includes/changes/RecentChangeTest.php b/tests/phpunit/includes/changes/RecentChangeTest.php index 2efc802cda..68f907958f 100644 --- a/tests/phpunit/includes/changes/RecentChangeTest.php +++ b/tests/phpunit/includes/changes/RecentChangeTest.php @@ -1,4 +1,5 @@ setMwGlobals( 'wgRCMaxAge', $maxAge ); + // Calculate this here instead of the data provider because the provider + // is expanded early on and the full test suite may take longer than 100 minutes + // when coverage is enabled. + $timestamp = time() + $offset; $this->assertEquals( $expected, RecentChange::isInRCLifespan( $timestamp, $tolerance ) ); } @@ -161,7 +165,7 @@ class RecentChangeTest extends MediaWikiTestCase { $pageProps->expects( $this->once() ) ->method( 'getProperties' ) ->with( $categoryTitle, 'hiddencat' ) - ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [ ] ) ); + ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [] ) ); $scopedOverride = PageProps::overrideInstance( $pageProps );