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.
Comment | File | Size | Author |
---|---|---|---|
#2 | simpletest-fixForUndefinedVarUser-2134351-2.patch | 509 bytes | tehbmar |
Comments
Comment #1
tehbmar CreditAttribution: tehbmar commentedIt seems like everything is still working for the most part, expect patch soon. (To be honest I just need the comment number)
Comment #2
tehbmar CreditAttribution: tehbmar commentedComment #3
tehbmar CreditAttribution: tehbmar commentedComment #5
tehbmar CreditAttribution: tehbmar commented2: simpletest-fixForUndefinedVarUser-2134351-2.patch queued for re-testing.
Comment #7
tehbmar CreditAttribution: tehbmar commentedIt'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.