function image_module_test_file_download

Same name in other branches
  1. 9 core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
  2. 8.9.x core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
  3. 10 core/modules/image/tests/modules/image_module_test/image_module_test.module \image_module_test_file_download()
  4. 11.x 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.

2 string references to 'image_module_test_file_download'
ImageStylesHTTPHeadersTestCase::_testImageStyleUrlAndPath in modules/image/image.test
Function to scale and test.
ImageStylesPathAndUrlTestCase::_testImageStyleUrlAndPath in modules/image/image.test
Test image_style_url().

File

modules/image/tests/image_module_test.module, line 8

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',
        );
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.