Recommended usage is to just pass the entire view name as the first and only arg:
$blog_js = $simpleCache->getUrl('blog/save_draft.js');
$favicon = $simpleCache->getUrl('graphics/favicon.ico');
For backwards compatibility with older versions of Elgg, you can also pass
"js" or "css" as the first arg, with the rest of the view name as the second arg:
$blog_js = $simpleCache->getUrl('js', 'blog/save_draft.js');
This automatically registers the view with Elgg's simplecache.
public function testGetUrlHandlesTwoArgumentsWhereSecondArgHasRedundantPrefix() { $this->markTestIncomplete(); $simpleCache = new SimpleCache(); $url = $simpleCache->getUrl('js', 'js/view.js'); $this->assertTrue(preg_match("#default/view.js\$#", $url)); }