function ImageEffectsTest::testResizeEffect
Tests the 'image_resize' effect.
File
- 
              core/
modules/ image/ tests/ src/ Kernel/ ImageEffectsTest.php, line 50  
Class
- ImageEffectsTest
 - Tests image effects.
 
Namespace
Drupal\Tests\image\KernelCode
public function testResizeEffect() : void {
  $this->assertImageEffect([
    'resize',
  ], 'image_resize', [
    'width' => 1,
    'height' => 2,
  ]);
  // Check the parameters.
  $calls = $this->imageTestGetAllCalls();
  // Width was passed correctly.
  $this->assertEquals(1, $calls['resize'][0][0]);
  // Height was passed correctly.
  $this->assertEquals(2, $calls['resize'][0][1]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.