Loading core/modules/image/tests/modules/image_module_test/image_module_test.module +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\image\ImageStyleInterface; function image_module_test_file_download($uri) { $default_uri = \Drupal::state()->get('image.test_file_download', FALSE); $default_uri = \Drupal::keyValue('image')->get('test_file_download', FALSE); if ($default_uri == $uri) { return ['X-Image-Owned-By' => 'image_module_test']; } Loading core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s $original_uri = $file_system->copy($file->uri, $scheme . '://', FileExists::Rename); // Let the image_module_test module know about this file, so it can claim // ownership in hook_file_download(). \Drupal::state()->set('image.test_file_download', $original_uri); \Drupal::keyValue('image')->set('test_file_download', $original_uri); $this->assertNotFalse($original_uri, 'Created the generated image file.'); // Get the URL of a file that has not been generated and try to create it. Loading Loading @@ -251,7 +251,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s // Make sure that access is denied for existing style files if we do not // have access. \Drupal::state()->delete('image.test_file_download'); \Drupal::keyValue('image')->delete('test_file_download'); $this->drupalGet($generate_url); $this->assertSession()->statusCodeEquals(403); Loading Loading @@ -301,7 +301,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s $original_uri = $file_system->copy($file->uri, $scheme . '://', FileExists::Rename); // Let the image_module_test module know about this file, so it can claim // ownership in hook_file_download(). \Drupal::state()->set('image.test_file_download', $original_uri); \Drupal::keyValue('image')->set('test_file_download', $original_uri); // Suppress the security token in the URL, then get the URL of a file that // has not been created and try to create it. Check that the security token Loading Loading
core/modules/image/tests/modules/image_module_test/image_module_test.module +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ use Drupal\image\ImageStyleInterface; function image_module_test_file_download($uri) { $default_uri = \Drupal::state()->get('image.test_file_download', FALSE); $default_uri = \Drupal::keyValue('image')->get('test_file_download', FALSE); if ($default_uri == $uri) { return ['X-Image-Owned-By' => 'image_module_test']; } Loading
core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s $original_uri = $file_system->copy($file->uri, $scheme . '://', FileExists::Rename); // Let the image_module_test module know about this file, so it can claim // ownership in hook_file_download(). \Drupal::state()->set('image.test_file_download', $original_uri); \Drupal::keyValue('image')->set('test_file_download', $original_uri); $this->assertNotFalse($original_uri, 'Created the generated image file.'); // Get the URL of a file that has not been generated and try to create it. Loading Loading @@ -251,7 +251,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s // Make sure that access is denied for existing style files if we do not // have access. \Drupal::state()->delete('image.test_file_download'); \Drupal::keyValue('image')->delete('test_file_download'); $this->drupalGet($generate_url); $this->assertSession()->statusCodeEquals(403); Loading Loading @@ -301,7 +301,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s $original_uri = $file_system->copy($file->uri, $scheme . '://', FileExists::Rename); // Let the image_module_test module know about this file, so it can claim // ownership in hook_file_download(). \Drupal::state()->set('image.test_file_download', $original_uri); \Drupal::keyValue('image')->set('test_file_download', $original_uri); // Suppress the security token in the URL, then get the URL of a file that // has not been created and try to create it. Check that the security token Loading