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
Comment #1
sylvain lecoy commentedIt 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.
Comment #2
sylvain lecoy commentedretitling.
Comment #3
danepowell commentedI'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 :(
Comment #4
sylvain lecoy commentedSorry 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.