function ImagecacheTokenTests::getTestImage in Imagecache Token 7
Generates a test image.
Return value
stdClass A file object.
1 call to ImagecacheTokenTests::getTestImage()
- ImagecacheTokenTests::testTokens in tests/
imagecache_token.test - Text that the image style tokens exist.
File
- tests/
imagecache_token.test, line 116 - Various tests for the Imagecache Token module.
Class
- ImagecacheTokenTests
- Test the Imagecache Token module.
Code
function getTestImage() {
// Get a file to upload.
$file = current($this
->drupalGetTestFiles('image'));
// Add a filesize property to files as would be read by file_load().
$file->filesize = filesize($file->uri);
return $file;
}