Hi,

I get

Fatal error: Class 'UbercartTestHelper' not found in /.../sites/all/modules/ubercart/uc_cart_links/uc_cart_links.test on line 11

if I rename the filename, I get this error in the next ubercart submodule, which is containing tests.

Comments

longwave’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Where do you see this error? All SimpleTests work and pass for me, and the testbot on drupal.org agrees.

tr’s picture

Category: bug » support

If you've updated your Ubercart site recently, it may be that you need to clear the cache in order to rebuild the class registry. UbercartTestHelper is in uc_store/uc_store.test.

longwave’s picture

@TR: but there is no class registry in D6, is there? Perhaps we need the same code that's in uc_order.test in D6:

// Ensure UbercartTestHelper is available.
module_load_include('test', 'uc_store', 'uc_store');
tr’s picture

Oh yeah. D6. No there's no class registry in D6. I don't see how this can happen then, or rather I don't see how this can happen on one site and not on another, unless there's a stale cache involved (maybe Boost or Pressflow or APC or some other non-core Drupal caching?).

longwave’s picture

I seem to remember having to add that code to uc_order.test as SimpleTest was loading it before uc_store.test, and the helper wasn't found in some cases. Perhaps the sequence of file loading is server dependent somehow - directory/filename order in the file system perhaps?

@jepSter: can you try adding the code from #3 to uc_cart_links.test and see if that helps?

longwave’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed code from #3 to uc_cart_links.test which should fix this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.