This is a followup of
MDL-49418 where a regression was fixed, related with some changes to require_login().
Such a function is so complex, has so many related implications, chained dependencies... that we should try to provide some extra acceptance tests verifying different aspects that may become broken in the future.
This is just to ensure some behaviors won't break with future modifications of such a central function.
Ideas are welcome, indeed.