Page MenuHomePhabricator

Failure in test IPInfoLogFormatterTest
Closed, ResolvedPublic

Description

On extension IPInfo

There were 2 failures:

1) MediaWiki\IPInfo\Test\Unit\Logging\IPInfoLogFormatterTest::testIPInfoLogDatabaseRows with data set "View infobox, full access" (array('ipinfo', 'view_infobox', 'Sysop', '127.0.0.1', array('ipinfo-view-full')), array('Sysop viewed IP Information i...ccess.', array('ipinfo-view-full')))
Action text is equal to expected text
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Sysop viewed IP Information infobox for 127.0.0.1. Full access.'
+'Sysop viewed IP Information infobox for . Full access.'

/workspace/src/tests/phpunit/includes/logging/LogFormatterTestCase.php:104
/workspace/src/extensions/IPInfo/tests/phpunit/integration/Logging/IPInfoLogFormatterTest.php:88
/workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:533
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97

2) MediaWiki\IPInfo\Test\Unit\Logging\IPInfoLogFormatterTest::testIPInfoLogDatabaseRows with data set "View popup, basic access" (array('ipinfo', 'view_popup', 'Sysop', '127.0.0.1', array('ipinfo-view-basic')), array('Sysop viewed IP Information p...ccess.', array('ipinfo-view-basic')))
Action text is equal to expected text
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Sysop viewed IP Information popup for 127.0.0.1. Limited access.'
+'Sysop viewed IP Information popup for . Limited access.'

/workspace/src/tests/phpunit/includes/logging/LogFormatterTestCase.php:104
/workspace/src/extensions/IPInfo/tests/phpunit/integration/Logging/IPInfoLogFormatterTest.php:88
/workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:533
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97

possible related to change https://gerrit.wikimedia.org/r/c/mediawiki/core/+/938886 not providing a mock for UserFactory::newAnonymous

Event Timeline

Change 945685 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] Mock UserFactory::newAnonymous in LogFormatterTestCase

https://gerrit.wikimedia.org/r/945685

Change 945685 merged by jenkins-bot:

[mediawiki/core@master] Mock UserFactory::newAnonymous in LogFormatterTestCase

https://gerrit.wikimedia.org/r/945685