diff --git a/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php b/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php index e926f3cd67..5b9d8bc4c1 100644 --- a/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php +++ b/core/modules/image/tests/src/Functional/ImageEffect/ConvertTest.php @@ -47,10 +47,12 @@ public function testConvertFileInRoot() { $this->assertFileExists($test_uri); // Execute the image style on the test image via a GET request. + $pipeline = \Drupal::service('image.processor')->createInstance('derivative') + ->setImageStyle(ImageStyle::load('image_effect_test')) + ->setSourceImageUri($test_uri); $derivative_uri = 'public://styles/image_effect_test/public/image-test-do.png.jpeg'; $this->assertFileNotExists($derivative_uri); - $url = file_url_transform_relative($image_style->buildUrl($test_uri)); - $this->drupalGet($this->getAbsoluteUrl($url)); + $this->drupalGet($pipeline->getDerivativeImageUrl()); $this->assertSession()->statusCodeEquals(200); $this->assertFileExists($derivative_uri); } diff --git a/core/modules/image/tests/src/Kernel/DerivativeImageProcessTest.php b/core/modules/image/tests/src/Kernel/DerivativeImageProcessTest.php index 98b277efb1..693731094e 100644 --- a/core/modules/image/tests/src/Kernel/DerivativeImageProcessTest.php +++ b/core/modules/image/tests/src/Kernel/DerivativeImageProcessTest.php @@ -13,11 +13,9 @@ class DerivativeImageProcessTest extends KernelTestBase { /** - * Modules to enable. - * - * @var array + * {@inheritdoc} */ - public static $modules = ['system', 'image', 'image_module_test']; + protected static $modules = ['system', 'image', 'image_module_test']; /** * The image processor service.