Posted by alex_b on October 11, 2009 at 11:46pm
Jump to:
| Project: | SimpleTest |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | boombatower |
| Status: | closed (fixed) |
Issue Summary
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
#1
It 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.
<?php$this->checkPermissions(array(), TRUE);
?>
If that fixes it then it is simply not refreshing and maybe we want a different solution.
#2
Please re-ropen with more details. Been over a month with no response.