public function ToolkitOperationsTest::testScaleAndCropNoAnchorOperation in ImageMagick 8.3
Test 'scale_and_crop' operation with no anchor passed in.
@dataProvider providerToolkitConfiguration
Parameters
string $toolkit_id: The id of the toolkit to set up.
string $toolkit_config: The config object of the toolkit to set up.
array $toolkit_settings: The settings of the toolkit to set up.
File
- tests/src/ Kernel/ ToolkitOperationsTest.php, line 167 
Class
- ToolkitOperationsTest
- Tests for ImageMagick toolkit operations.
Namespace
Drupal\Tests\imagemagick\KernelCode
public function testScaleAndCropNoAnchorOperation(string $toolkit_id, string $toolkit_config, array $toolkit_settings) : void {
  $this
    ->setUpToolkit($toolkit_id, $toolkit_config, $toolkit_settings);
  $image = $this->imageFactory
    ->get();
  $image
    ->createNew(100, 200);
  $image
    ->apply('scale_and_crop', [
    'width' => 5,
    'height' => 10,
  ]);
  $this
    ->assertSame("-size 100x200 xc:transparent -resize 5x10! -crop 5x10+0+0 +repage", $image
    ->getToolkit()
    ->arguments()
    ->toString(ImagemagickExecArguments::POST_SOURCE));
}