Page MenuHomePhabricator

Wikimedia\ParamValidator\ValidationException : Validation of `test` failed: baduser
Closed, InvalidPublic

Description

I get this error when running vendor/bin/phpunit core:unit:

There was 1 error:

1) MediaWiki\ParamValidator\TypeDef\UserDefTest::testValidate with data set "T232672: U+200E at position 0 for name" ('Emma', 'Emma')
Wikimedia\ParamValidator\ValidationException: Validation of `test` failed: baduser

/Users/kostajh/src/mediawiki/w/includes/libs/ParamValidator/TypeDef.php:66
/Users/kostajh/src/mediawiki/w/includes/ParamValidator/TypeDef/UserDef.php:88
/Users/kostajh/src/mediawiki/w/tests/phpunit/unit/includes/libs/ParamValidator/TypeDef/TypeDefTestCase.php:89

It looks like the test case that fails was touched last in rMW9308ee9cf881: UserDef: no need to return full User objects (cc @DannyS712). This passes in CI, so I guess it is something specific to my macOS PHP 7.4 local setup?

Event Timeline

Google suggests that the character found is a left to right marker - is your local language not English? Otherwise, my only idea is to remove and redownload the file in case there was some accidental drift that git ignores

Google suggests that the character found is a left to right marker - is your local language not English?

My LocalSettings.php is en and my OS (macOS) is using English. But that shouldn't affect what is happening in this test?

Otherwise, my only idea is to remove and redownload the file in case there was some accidental drift that git ignores

Sorry, which file?

Google suggests that the character found is a left to right marker - is your local language not English?

My LocalSettings.php is en and my OS (macOS) is using English. But that shouldn't affect what is happening in this test?

Otherwise, my only idea is to remove and redownload the file in case there was some accidental drift that git ignores

Sorry, which file?

the file with this failure, tests/phpunit/unit/includes/ParamValidator/TypeDef/UserDefTest.php

Change 802089 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] TypeDefTestCase: Skip test on non-Linux environment

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

No longer reproducible, closing this.

Change 802089 abandoned by Kosta Harlan:

[mediawiki/core@master] TypeDefTestCase: Skip test on non-Linux environment

Reason:

no longer reproducible

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