Page MenuHomePhabricator

Several HooksTest.php tests have data providers which due to a bug do not provide the correct parameters
Closed, ResolvedPublic1 Estimated Story Points

Description

The data providers ::provideOnAuthManagerLoginAuthenticateAudit, ::provideOnAuthManagerLoginAuthenticateAuditWithCentralAuthInstalled, and ::provideOnAuthManagerLoginAuthenticateAuditNoSave do not correctly generate the test cases. They are supposed to provide test cases that test the code under a variety of values of $wgCheckUserEventTablesMigrationStage, but they fail to do this due to a bug and therefore only test the migration value of SCHEMA_COMPAT_OLD.

These tests should be fixed to ensure that they actually fully cover the code they are testing. They will be fixed if https://doc.wikimedia.org/cover-extensions/CheckUser/src/Hooks.php.html#535 is showing test coverage.

Acceptance criteria

Event Timeline

Dreamy_Jazz renamed this task from Several HooksTest tests have invalid data providers to Several HooksTest tests have data providers which due to a bug do not provide the correct parameters.Mar 28 2024, 10:19 PM
Dreamy_Jazz renamed this task from Several HooksTest tests have data providers which due to a bug do not provide the correct parameters to Several HooksTest.php tests have data providers which due to a bug do not provide the correct parameters.
Dreamy_Jazz updated the task description. (Show Details)
Dreamy_Jazz set the point value for this task to 1.

Change #1015404 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Fix data providers in HooksTest.php

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

Change #1015404 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Fix data providers in HooksTest.php

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

Dreamy_Jazz updated the task description. (Show Details)