Not sure if this should be an imagecache or simpletest issue, but I found a problem writing tests for imagecache actions. You'll get a 404 when trying to drupalGet(....imagecache...). The problem is that the menu router is built before $conf['file_directory_path'] is set.

See http://drupalcontrib.org/api/function/imagecache_menu/6

  // standard imagecache callback.
  $items[file_directory_path() .'/imagecache'] = array(
    'page callback' => 'imagecache_cache',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK
  );

The workaround I found was to put menu_router_build(TRUE); in the tests' setUp() function. But perhaps the bootstrap order could be adjusted so this isn't necessary.

Comments

grendzy’s picture

Status: Active » Closed (duplicate)