Page MenuHomePhabricator

Make HookRunnerTest usable in extension tests
Closed, ResolvedPublic


With the new hook system, extensions define their own HookRunners. Thus, it would be useful to allow using HookRunnerTest for extension runners.

I think a possibility would be to have the current HookRunnerTest become an abstract class (it should also be renamed), with provideHookRunners as abstract method. Extensions would extend this class and return the names of their hook runners. Core would do the same, like HookRunnerTest::provideHookRunners currently does.

Event Timeline

FTR, the other important things to do are:

  • Marking the new abstract class as @stable to extend in extensions
  • Adding it to the test autoloader

Change 655197 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] Add HookRunnerTestBase for use by extensions

Change 655197 merged by jenkins-bot:
[mediawiki/core@master] Add HookRunnerTestBase for use by extensions