I don't had the time to deeply look where was the bug and how to systematically reproduce it, however I am encountering it since almost 1 week without understanding the cause.

When testing manually, it works as designed, when testing automatically through drupalPost(), it fails with a 500 error. When I go through the debugger, it seems that the $form_state is empty for unknown reasons.

Here is the only test who fail: http://qa.drupal.org/pifr/test/298013.

I report it because its not from my config, so I think that come from SimpleTest.

Comments

sylvain lecoy’s picture

It seems happening when relying on the entity module.

Here is the server log causing the 500: [12-Aug-2012 22:41:31] PHP Fatal error: Call to undefined function entity_get_info() in D:\Users\Sylvain\Workspace\PHP\lc\htdocs\sites\all\modules\entity\includes\entity.inc on line 55.

In the manual testing, drupal is fully loaded, in the test context, the common.inc seems not yet loaded when entity needs to call this function.

sylvain lecoy’s picture

Title: drupalPost() fail to pass temporary data on form submit. » drupalPost() fail to pass entity data on form submit.

retitling.

danepowell’s picture

I'm getting the exact same error- when I run drupalPost in my simpletest that depends on entity, I get the same 500 response and error.

Did you ever figure this out? Can you suggest how to debug? I'm stumped :(

sylvain lecoy’s picture

Sorry Dane I was so pissed off by simpletest that I worked on my own sandbox with PHPUnit.

I guess this will not be fixed for now, I suggest you to deal with it and think as a known limitation of SimpleTest.

Will be fixed in Drupal 9.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.