Dear Team,
Came across a situation similar to [1] where I had to call submit()
function of a FormSpecialPage during a unit test. We have something going
on in the background, and $this->getUser() needs to return a valid user.
Is there a way to mimic this context inside the unit test, so that I can
manually set a $user in the unit test, and this would be used while
performing inner operations ?
[1]
https://gerrit.wikimedia.org/r/#/c/399995/4/tests/specials/SpecialNewslette…
--
Tony Thomas
https://mediawiki.org/wiki/User:01tonythomas
--