Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
adf2518b
Commit
adf2518b
authored
Oct 31, 2012
by
Nathaniel Catchpole
Browse files
Issue
#1824926
by vijaycs85: Convert image_module_test_file_download() variable to CMI system.
parent
6b8d66b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
View file @
adf2518b
...
...
@@ -106,7 +106,7 @@ function _testImageStyleUrlAndPath($scheme, $clean_url = TRUE) {
$original_uri
=
file_unmanaged_copy
(
$file
->
uri
,
$scheme
.
'://'
,
FILE_EXISTS_RENAME
);
// Let the image_module_test module know about this file, so it can claim
// ownership in hook_file_download().
variable_
set
(
'image
_module_
test_file_download'
,
$original_uri
);
state
()
->
set
(
'image
.
test_file_download'
,
$original_uri
);
$this
->
assertNotIdentical
(
FALSE
,
$original_uri
,
'Created the generated image file.'
);
// Get the URL of a file that has not been generated and try to create it.
...
...
core/modules/image/tests/image_module_test.module
View file @
adf2518b
...
...
@@ -6,7 +6,8 @@
*/
function
image_module_test_file_download
(
$uri
)
{
if
(
variable_get
(
'image_module_test_file_download'
,
FALSE
)
==
$uri
)
{
$default_uri
=
state
()
->
get
(
'image.test_file_download'
)
?:
FALSE
;
if
(
$default_uri
==
$uri
)
{
return
array
(
'X-Image-Owned-By'
=>
'image_module_test'
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment