Once tests are done running and HTML for the results is generated, the execution of the admin/build/simpletest page (for instance, rendering of the blocks) continues with the static values produced by the tests. module_list(), module_implements(), drupal_get_schema(), for instance, are broken.

Example : when running a site with Views enabled and a 'page' view if defined, after running some tests you get the following (abridged) call sequence :
user_block()
menu_tree('navigation')
_menu_check_access($item = menu item for the 'page' views, with 'access_callback' = 'views_access')
views_access()
views_db_object::init()
drupal_get_schema('views_view') - views was not enabled during the tests, so this returns FALSE, which of course views's code doesn't expect and you get nasty PHP error messages.

Attached patch resets a few important static variables in tearDown()

Comments

yched’s picture

Status: Active » Needs review
yched’s picture

StatusFileSize
new866 bytes

Oops, previous patch merged in pwolanin's http://drupal.org/node/274486

yched’s picture

StatusFileSize
new872 bytes

Fixed the call language_list().

boombatower’s picture

Status: Needs review » Postponed

Lets see if we backport 7.x batch API version which eliminates static issues all together.

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Postponed » Fixed

backported.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.