function ImageCacheUrlTests::testImageCacheCreateUrl in ImageCache 5.2
Same name and namespace in other branches
- 6.2 tests/imagecache_create_url.test \ImageCacheUrlTests::testImageCacheCreateUrl()
Test function that tests imagecache_create_url() under the different combinations of clean URLs and file download method
File
- tests/
imagecache_create_url.test, line 79
Class
- ImageCacheUrlTests
- Test class for testing imagecache_create_url() in several use cases with the different combinations of clean URLs and private/public download method.
Code
function testImageCacheCreateUrl() {
// No Clean URLs + public downloads : http://example.com/?q=path/to/files/imagecache/preset/foo.jpg
$this
->_ImagecacheCreateUrlTest(false, FILE_DOWNLOADS_PUBLIC, 'path/to/files', 'preset', 'foo.jpg', 'http://example.com/?q=path/to/files/imagecache/preset/foo.jpg');
// Clean URLs + public downloads : http://example.com/path/to/files/imagecache/preset/foo.jpg
$this
->_ImagecacheCreateUrlTest(true, FILE_DOWNLOADS_PUBLIC, 'path/to/files', 'preset', 'foo.jpg', 'http://example.com/path/to/files/imagecache/preset/foo.jpg');
// No Clean URLs + private downloads : http://example.com/?q=system/files/imagecache/preset/foo.jpg
$this
->_ImagecacheCreateUrlTest(false, FILE_DOWNLOADS_PRIVATE, 'path/to/files', 'preset', 'foo.jpg', 'http://example.com/?q=system/files/imagecache/preset/foo.jpg');
// Clean URLs + private downloads : http://example.com/system/files/imagecache/preset/foo.jpg
$this
->_ImagecacheCreateUrlTest(true, FILE_DOWNLOADS_PRIVATE, 'path/to/files', 'preset', 'foo.jpg', 'http://example.com/system/files/imagecache/preset/foo.jpg');
}