public function ImageEffectsTest::testResizeEffect in Drupal 8
Test the image_resize_effect() function.
File
- core/modules/ image/ tests/ src/ Functional/ ImageEffectsTest.php, line 42 
Class
- ImageEffectsTest
- Tests that the image effects pass parameters to the toolkit correctly.
Namespace
Drupal\Tests\image\FunctionalCode
public function testResizeEffect() {
  $this
    ->assertImageEffect('image_resize', [
    'width' => 1,
    'height' => 2,
  ]);
  $this
    ->assertToolkitOperationsCalled([
    'resize',
  ]);
  // Check the parameters.
  $calls = $this
    ->imageTestGetAllCalls();
  $this
    ->assertEqual($calls['resize'][0][0], 1, 'Width was passed correctly');
  $this
    ->assertEqual($calls['resize'][0][1], 2, 'Height was passed correctly');
}