function image_module_test_file_download in Drupal 7
Same name and namespace in other branches
- 8 core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
 - 9 core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
 
@file Provides Image module hook implementations for testing purposes.
1 string reference to 'image_module_test_file_download'
- ImageStylesPathAndUrlTestCase::_testImageStyleUrlAndPath in modules/
image/ image.test  - Test image_style_url().
 
File
- modules/
image/ tests/ image_module_test.module, line 8  - Provides Image module hook implementations for testing purposes.
 
Code
function image_module_test_file_download($uri) {
  if (variable_get('image_module_test_file_download', FALSE) == $uri) {
    return array(
      'X-Image-Owned-By' => 'image_module_test',
    );
  }
  if (variable_get('image_module_test_invalid_headers', FALSE) == $uri) {
    return array(
      'Content-Type' => 'image/png',
    );
  }
}