Initial commit

This commit is contained in:
Mauricio Dinarte 2024-12-04 10:11:27 -06:00
commit c5e731d8ae
2773 changed files with 600767 additions and 0 deletions

View file

@ -0,0 +1,13 @@
name = Image Styles test
description = Provides additional hook implementations for testing Image Styles functionality.
package = Core
version = VERSION
core = 7.x
files[] = image_module_styles_test.module
dependencies[] = image_module_test
hidden = TRUE
; Information added by Drupal.org packaging script on 2024-03-06
version = "7.100"
project = "drupal"
datestamp = "1709734591"

View file

@ -0,0 +1,29 @@
<?php
/**
* @file
* Provides additional Image module hook implementations for testing purposes.
*/
/**
* Implements hook_image_default_styles().
*/
function image_module_styles_test_image_default_styles() {
$styles = array();
$styles['test_image_style'] = array(
'label' => 'Test Image Style',
'effects' => array(
array(
'name' => 'image_scale',
'data' => array('width' => 100, 'height' => 100, 'upscale' => 1),
'weight' => 0,
),
array(
'name' => 'image_module_test_null',
),
)
);
return $styles;
}

View file

@ -0,0 +1,12 @@
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 2024-03-06
version = "7.100"
project = "drupal"
datestamp = "1709734591"

View file

@ -0,0 +1,54 @@
<?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');
}
if (variable_get('image_module_test_invalid_headers', FALSE) == $uri) {
return array('Content-Type' => 'image/png');
}
}
/**
* Implements hook_image_effect_info().
*/
function image_module_test_image_effect_info() {
$effects = array(
'image_module_test_null' => array(
'label' => 'image_module_test_null',
'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(&$image, array $data) {
return TRUE;
}
/**
* Implements hook_image_effect_info_alter().
*
* Used to keep a count of cache misses in image_effect_definitions().
*/
function image_module_test_image_effect_info_alter(&$effects) {
$image_effects_definition_called = &drupal_static(__FUNCTION__, 0);
$image_effects_definition_called++;
}