diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php index e5f162f..a817fdb 100644 --- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php +++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php @@ -254,14 +254,12 @@ public function testScaleSame() { * Tests \Drupal\Core\Image\Image::scaleAndCrop(). */ public function testScaleAndCropWidth() { - $this->toolkit->expects($this->at(7)) - ->method('process') - ->with($this->equalTo('resize')) - ->will($this->returnValue(TRUE)); - - $this->toolkit->expects($this->at(11)) + $this->toolkit->expects($this->exactly(2)) ->method('process') - ->with($this->equalTo('crop')) + ->with($this->logicalOr( + $this->equalTo('resize'), + $this->equalTo('crop') + ) ->will($this->returnArgument(2)); $result = $this->image->scaleAndCrop(34, 50); @@ -272,14 +270,12 @@ public function testScaleAndCropWidth() { * Tests \Drupal\Core\Image\Image::scaleAndCrop(). */ public function testScaleAndCropHeight() { - $this->toolkit->expects($this->at(7)) - ->method('process') - ->with($this->equalTo('resize')) - ->will($this->returnValue(TRUE)); - - $this->toolkit->expects($this->at(11)) + $this->toolkit->expects($this->exactly(2)) ->method('process') - ->with($this->equalTo('crop')) + ->with($this->logicalOr( + $this->equalTo('resize'), + $this->equalTo('crop') + ) ->will($this->returnArgument(2)); $result = $this->image->scaleAndCrop(44, 40);