aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/integration/includes
diff options
context:
space:
mode:
authorYiannis Giannelos <jgiannelos@wikimedia.org>2024-09-17 13:16:03 +0200
committerC. Scott Ananian <cscott@cscott.net>2024-10-04 14:52:30 -0400
commitfec9daae4e5f71114dc3a4a631674b5da0827d1a (patch)
treefa6ce9c31e9718407a4da8e7115a55bc5eb73f22 /tests/phpunit/integration/includes
parentefab066bcf58a1605db399f7be2e66c85f3258c1 (diff)
downloadmediawikicore-fec9daae4e5f71114dc3a4a631674b5da0827d1a.tar.gz
mediawikicore-fec9daae4e5f71114dc3a4a631674b5da0827d1a.zip
Use statslib for metrics emitted by HtmlOutputRendererHelper
Bug: T359476 Change-Id: If8bc5a7f7383dcb67dadf1f4c02d1b69d7c8fa53
Diffstat (limited to 'tests/phpunit/integration/includes')
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php6
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php3
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
index e3d3a953f757..d81b96a22538 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
@@ -53,7 +53,7 @@ use Wikimedia\Parsoid\Core\ClientError;
use Wikimedia\Parsoid\Core\PageBundle;
use Wikimedia\Parsoid\Core\ResourceLimitExceededException;
use Wikimedia\Parsoid\Parsoid;
-use Wikimedia\Stats\NullStatsdDataFactory;
+use Wikimedia\Stats\StatsFactory;
use Wikimedia\TestingAccessWrapper;
/**
@@ -244,7 +244,7 @@ class HtmlOutputRendererHelperTest extends MediaWikiIntegrationTestCase {
return new HtmlOutputRendererHelper(
$stash,
- new NullStatsdDataFactory(),
+ StatsFactory::newNull(),
$options['ParserOutputAccess'] ?? $this->newMockParserOutputAccess(
$options['expectedHtml'] ?? null
),
@@ -852,7 +852,7 @@ class HtmlOutputRendererHelperTest extends MediaWikiIntegrationTestCase {
$parserCacheFactory,
$services->getRevisionLookup(),
$services->getRevisionRenderer(),
- $services->getStatsFactory(),
+ StatsFactory::newNull(),
$services->getDBLoadBalancerFactory(),
$services->getChronologyProtector(),
$this->getLoggerSpi(),
diff --git a/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
index a79979bc0d0e..f876c1084a3d 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
@@ -25,6 +25,7 @@ use Wikimedia\ObjectCache\HashBagOStuff;
use Wikimedia\Parsoid\Core\ClientError;
use Wikimedia\Parsoid\Core\ResourceLimitExceededException;
use Wikimedia\Parsoid\Parsoid;
+use Wikimedia\Stats\StatsFactory;
/**
* @covers \MediaWiki\Rest\Handler\RevisionHTMLHandler
@@ -82,7 +83,7 @@ class RevisionHTMLHandlerTest extends MediaWikiIntegrationTestCase {
->willReturnCallback( static function ( $page, $parameters, $authority, $revision, $lenientRevHandling ) use ( $services, $parsoidOutputStash ) {
return new HtmlOutputRendererHelper(
$parsoidOutputStash,
- $services->getStatsdDataFactory(),
+ StatsFactory::newNull(),
$services->getParserOutputAccess(),
$services->getPageStore(),
$services->getRevisionLookup(),