diff --git a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php index 5a5c33b..1005853 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php +++ b/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php @@ -9,8 +9,8 @@ use Drupal\Core\Plugin\PluginBase; use Drupal\Core\Image\ImageInterface; -use Drupal\Core\ImageToolkit\ImageToolkitInterface; use Drupal\Core\ImageToolkit\ImageToolkitBase; +use Drupal\Core\ImageToolkit\ImageToolkitInterface; /** * Defines the GD2 toolkit for image manipulation within Drupal. diff --git a/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php b/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php index 4d549c1..4bf7555 100644 --- a/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php +++ b/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php @@ -9,6 +9,7 @@ use Drupal\Core\Plugin\PluginBase; use Drupal\Core\Image\ImageInterface; +use Drupal\Core\ImageToolkit\ImageToolkitBase; use Drupal\Core\ImageToolkit\ImageToolkitInterface; /** diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php index f902d78..008d784 100644 --- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php +++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php @@ -219,7 +219,7 @@ public function testProcessInfoFails() { */ public function testScaleWidth() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('resize')) ->will($this->returnArgument(2)); $result = $this->image->scale(44); @@ -231,7 +231,7 @@ public function testScaleWidth() { */ public function testScaleHeight() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('resize')) ->will($this->returnArgument(2)); @@ -245,7 +245,7 @@ public function testScaleHeight() { public function testScaleSame() { // Dimensions are the same, resize should not be called. $this->toolkit->expects($this->never()) - ->method('process'); + ->method('apply'); $this->image->scale(88, 100); } @@ -255,7 +255,7 @@ public function testScaleSame() { */ public function testScaleAndCropWidth() { $this->toolkit->expects($this->exactly(2)) - ->method('process') + ->method('apply') ->with($this->logicalOr( $this->equalTo('resize'), $this->equalTo('crop') @@ -271,7 +271,7 @@ public function testScaleAndCropWidth() { */ public function testScaleAndCropHeight() { $this->toolkit->expects($this->exactly(2)) - ->method('process') + ->method('apply') ->with($this->logicalOr( $this->equalTo('resize'), $this->equalTo('crop') @@ -287,7 +287,7 @@ public function testScaleAndCropHeight() { */ public function testScaleAndCropFails() { $this->toolkit->expects($this->exactly(1)) - ->method('process') + ->method('apply') ->with($this->equalTo('resize')) ->will($this->returnValue(FALSE)); @@ -299,7 +299,7 @@ public function testScaleAndCropFails() { */ public function testCropWidth() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('crop')) ->will($this->returnArgument(2)); // Cropping with width only should preserve the aspect ratio. @@ -312,7 +312,7 @@ public function testCropWidth() { */ public function testCropHeight() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('crop')) ->will($this->returnArgument(2)); // Cropping with height only should preserve the aspect ratio. @@ -325,7 +325,7 @@ public function testCropHeight() { */ public function testCrop() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('crop')) ->will($this->returnArgument(2)); $result = $this->image->crop(0, 0, 44, 50); @@ -337,7 +337,7 @@ public function testCrop() { */ public function testResize() { $this->toolkit->expects($this->exactly(2)) - ->method('process') + ->method('apply') ->with($this->equalTo('resize')) ->will($this->returnArgument(2)); // Resize with integer for width and height. @@ -353,7 +353,7 @@ public function testResize() { */ public function testDesaturate() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('desaturate')); $this->image->desaturate(); } @@ -363,7 +363,7 @@ public function testDesaturate() { */ public function testRotate() { $this->toolkit->expects($this->once()) - ->method('process') + ->method('apply') ->with($this->equalTo('rotate')); $this->image->rotate(90); }