This may have some overlap with #295559: Cannot create user with permissions for contrib modules. but I think it is a distinct issue:
Problem:
I've got a situation where creating new configurations for imports create new permissions (e. g. "import [newtype] feeds"). checkPermissions() fails to verify these permissions created on the fly.
Analysis:
I *think* this happens because checkPermissions uses module_invoke_all('perm') to collect all available permissions but module_invoke_all('perm') gathers from the system that executes the tests - not the tested system that actually contains these permissions.
Is this analysis correct? What's the way to deal with this problem?
Comments
Comment #1
boombatower commentedIt shouldn't load the permissions until someone tries to create a user in a test and thus it does it in the tested environment.
Please try adding the following to your test before you create the user.
If that fixes it then it is simply not refreshing and maybe we want a different solution.
Comment #2
boombatower commentedPlease re-ropen with more details. Been over a month with no response.