While running tests for any other module when the Redis module is in the codebase, the following error is output:
Fatal error: Class 'Redis_Tests_Cache_FixesUnitTestCase' not found in lib/Redis/Tests/Cache/PhpRedisFixesUnitTestCase.test on line 4

CommentFileSizeAuthor
#2 redis-n2666866-2.patch3.09 KBdamienmckenna

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new3.09 KB

I repeatedly re-ran simpletest and added require_once() statements to the files that triggered the errors, with this patch it's possible for me to run tests for other modules.

pounard’s picture

I'm quite surprised, it works flawlessly on my own sites... Does the redis.autoload.inc is loaded within your site ? This is mandatory for it to work (actually it's mandatory only to run the tests, no to see them in the UI)

EDIT: also, there is this file in the .info file:

files[] = lib/Redis/Tests/Cache/FlushUnitTestCase.php

And on my box:

user@devhost2-1:~/mysite/www/sites/all/modules/contrib/redis$ ls lib/Redis/Tests/Cache/FlushUnitTestCase.php
lib/Redis/Tests/Cache/FlushUnitTestCase.php

I guess your Drupal autoloader is fucked-up, try to fixing it before applying any patch.

damienmckenna’s picture

I hadn't even enabled the module, just having it downloaded and sitting in sites/all/modules/contrib was triggering the problem.

pounard’s picture

Ok; that's a core bug I guess, it did parse the .test files, but not the other classes from the .info file, I guess this is probably normal since the module is not enabled, but it's dawn stupid in the end because it will eventually make the test list page crash because of non-autloaded classes... I will add a workaround but also file a core issue too.

damienmckenna’s picture

I'm happy to help with the core issue because I've come across the problem in other projects (#2579375: Smartling causes simpletest to fail).

pounard’s picture

I actually seriously don't have enough spare time to work with core right now, but as I am doing maintainance over the module, I'll apply your patch.

pounard’s picture

Status: Needs review » Fixed

And it's done! Thanks.

There will be a new release today.

damienmckenna’s picture

Thanks!

Status: Fixed » Closed (fixed)

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