Jump to content

Topic on Manual talk:Configuration for developers

PhpUnit and $wgConfigRegistry

3
André Costa (WMSE) (talkcontribs)

The current text in Testing suggests that setMwGlobals should only be used for core and manifest version 1 extensions. However using $wgConfigRegistry in a unittest for a manifest version 2 extension doesn't actually override the configs (phab:T255497) nor is this used by any extension today.

Is $wgConfigRegistry meant to work in phpunit or is the phrasing of the section merely in need of tweaking?

André Costa (WMSE) (talkcontribs)

Ping @Samwilson since you added the original text

Samwilson (talkcontribs)

I suspect it's out of date and needs updating. I'm pretty sure extensions are allowed to use setMwGlobals(); lots certainly do.

Reply to "PhpUnit and $wgConfigRegistry"