summaryrefslogtreecommitdiffstats
path: root/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-12-23 15:11:54 (GMT)
committerNathaniel Catchpole2014-12-23 15:11:54 (GMT)
commit95d4c594b047d0df68df22cbe1709631509a99bf (patch)
treede7e6c6645e93b8a5ddaa885bca21423e88f9be1 /core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
parent37cdcf8d97799fcdbbbbbd80ecc1e480628ce0e1 (diff)
Issue #2395395 by alexpott, effulgentsia, Gábor Hojtsy: TestBase lacks a config method to be used consistently in tests
Diffstat (limited to 'core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php')
-rw-r--r--core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
index b57ce9f..abe8ffb 100644
--- a/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/src/Tests/ImageStylesPathAndUrlTest.php
@@ -119,7 +119,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// Make the default scheme neither "public" nor "private" to verify the
// functions work for other than the default scheme.
- \Drupal::config('system.file')->set('default_scheme', 'temporary')->save();
+ $this->config('system.file')->set('default_scheme', 'temporary')->save();
// Create the directories for the styles.
$directory = $scheme . '://styles/' . $this->style->id();
@@ -162,11 +162,11 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// rather than a URI. We need to temporarily switch the default scheme to
// match the desired scheme before testing this, then switch it back to the
// "temporary" scheme used throughout this test afterwards.
- \Drupal::config('system.file')->set('default_scheme', $scheme)->save();
+ $this->config('system.file')->set('default_scheme', $scheme)->save();
$relative_path = file_uri_target($original_uri);
$generate_url_from_relative_path = $this->style->buildUrl($relative_path, $clean_url);
$this->assertEqual($generate_url, $generate_url_from_relative_path);
- \Drupal::config('system.file')->set('default_scheme', 'temporary')->save();
+ $this->config('system.file')->set('default_scheme', 'temporary')->save();
// Fetch the URL that generates the file.
$this->drupalGet($generate_url);
@@ -220,7 +220,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// Allow insecure image derivatives to be created for the remainder of this
// test.
- \Drupal::config('image.settings')->set('allow_insecure_derivatives', TRUE)->save();
+ $this->config('image.settings')->set('allow_insecure_derivatives', TRUE)->save();
// Create another working copy of the file.
$files = $this->drupalGetTestFiles('image');
@@ -233,7 +233,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
// 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
// is not present in the URL but that the image is still accessible.
- \Drupal::config('image.settings')->set('suppress_itok_output', TRUE)->save();
+ $this->config('image.settings')->set('suppress_itok_output', TRUE)->save();
$generated_uri = $this->style->buildUri($original_uri);
$this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
$generate_url = $this->style->buildUrl($original_uri, $clean_url);
@@ -247,7 +247,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
*/
protected function enablePageCache() {
// Turn on page caching and rerun the test.
- $config = \Drupal::config('system.performance');
+ $config = $this->config('system.performance');
$config->set('cache.page.use_internal', 1);
$config->set('cache.page.max_age', 300);
$config->save();