Download & Extend

Call to undefined function _drupal_get_last_caller()

Project:SimpleTest
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

Updated to the latest DRUPAL-6--2 CVS branch code to check if things were doing better and I get this on all test runs:

An error occurred. /batch?id=808&op=do
Fatal error: Call to undefined function _drupal_get_last_caller() in /home/dave/Projects/www/drupal6dev/sites/all/modules/simpletest/drupal_web_test_case.php on line 217

Comments

#1

Status:active» closed (works as designed)

I didn't apply the patch. My bad.

#2

what patch?

#3

>Fatal error: Call to undefined function _drupal_get_last_caller() in /sites/all/modules/contrib/simpletest/drupal_web_test_case.php on line 465

This is the latest dev from November.

#4

Check the latest INSTALL.txt - you need to apply a core patch that defines the function.

#5

SimpleTest is a great module for enforcing best practice. We're trying to get everyone using it here as a matter of course, certainly for developing modules which otherwise have no user feedback (API modules etc.)

Without wanting to tread on any toes, and given "Do not hack core" is a central tenet of community policy, then shouldn't this core hack be worked around somehow? Otherwise it's encouraging bad practice. Is there an issue already open for that?

Also, I can't deploy SimpleTest in exactly-like-production environments if I have to hack core to use it, which means I can't guarantee my unit tests means things will work exactly the same way in production. I'll dig into the patches to check that if I have to, but again it seems a shame that people will trust their weight less to SimpleTest.

#6

I was questioning this myself, and I imagine a "proper" solution (in the strictest sense of the word) would involve either integrating this patch into Drupal core, or otherwise working around the need for it to begin with. I do understand the justification from a more pragmatic standpoint, but surely there is a cleaner way to do this. I can't seem to find a related issue in the queue - perhaps a new ticket should be opened to discuss this further?

#7

Any thoughts on this? Is a better solution planned for D7? There doesn't seem to be an INSTALL.txt in the D7 version.

#8

Any thoughts on this? Is a better solution planned for D7? There doesn't seem to be an INSTALL.txt in the D7 version.

You don't need to apply the patch in the D7 version because it's already included in core. For that matter, SimpleTest is not needed in Drupal 7 because the "Testing" module is included in Drupal 7, all you have to do is turn it on.