Issue: Upon running any tests that extend DrupalWebTestCase you will receive an exception in (drupal_web_test_case.php) DrupalWebTestCase->setUpInstall() on line 1383 resulting in the test to fail.

Similar issues: #976838: Undefined variable: user when running simpletest tests the fix supplied by scor doesn't fully fix the issue. It results in the user running the test to be logged out.

Possible Fix: Remove lines 1382-1385 in DrupalWebTestCase->setUpInstall(). The reason for this is that in the DrupalWebTestCase->setUp() function your site account is saved in $this->originalUser then $user is replaced with user_load(1), but once DrupalWebTestCase->setUpInstall() fires it replaces your correctly assigned $this->originalUser with $user (which at this point is n pointing to a fake user with uid 1). These are just assumptions based off of light debugging, I will be writing a patch for this now.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tehbmar’s picture

It seems like everything is still working for the most part, expect patch soon. (To be honest I just need the comment number)

tehbmar’s picture

tehbmar’s picture

Assigned: Unassigned » tehbmar
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: simpletest-fixForUndefinedVarUser-2134351-2.patch, failed testing.

tehbmar’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: simpletest-fixForUndefinedVarUser-2134351-2.patch, failed testing.

tehbmar’s picture

It's looking like there might be an issue with the QA bot, I just did a fresh simpletest install with my patch and it worked fine.