13
modules/image/tests/image_module_test.info
Normal file
13
modules/image/tests/image_module_test.info
Normal file
@@ -0,0 +1,13 @@
|
||||
name = Image test
|
||||
description = Provides hook implementations for testing Image module functionality.
|
||||
package = Core
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
files[] = image_module_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-08-01
|
||||
version = "7.15"
|
||||
project = "drupal"
|
||||
datestamp = "1343839327"
|
||||
|
41
modules/image/tests/image_module_test.module
Normal file
41
modules/image/tests/image_module_test.module
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Provides Image module hook implementations for testing purposes.
|
||||
*/
|
||||
|
||||
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');
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_image_effect_info().
|
||||
*/
|
||||
function image_module_test_image_effect_info() {
|
||||
$effects = array(
|
||||
'image_module_test_null' => array(
|
||||
'effect callback' => 'image_module_test_null_effect',
|
||||
),
|
||||
);
|
||||
|
||||
return $effects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Image effect callback; Null.
|
||||
*
|
||||
* @param $image
|
||||
* An image object returned by image_load().
|
||||
* @param $data
|
||||
* An array with no attributes.
|
||||
*
|
||||
* @return
|
||||
* TRUE
|
||||
*/
|
||||
function image_module_test_null_effect(array &$image, array $data) {
|
||||
return TRUE;
|
||||
}
|
Reference in New Issue
Block a user