function CDNUnitTestCase::getExpandedFilePath in CDN 7.2
Given a file URI, get the expanded file path.
Parameters
$uri: @see file_stream_wrapper_get_instance_by_uri()
Return value
A Drupal root-relative path.
1 call to CDNUnitTestCase::getExpandedFilePath()
- CDNUnitTestCase::touchFile in tests/
cdn.test - Given a file URI, get its path, create the file and ensure it exists.
File
- tests/
cdn.test, line 134 - Test CDN.
Class
- CDNUnitTestCase
- @file Test CDN.
Code
function getExpandedFilePath($uri) {
$wrapper = file_stream_wrapper_get_instance_by_uri($uri);
return str_replace($GLOBALS['base_url'] . '/', '', $wrapper
->getExternalUrl());
}