You are here

function ImageEffectsTest::testConvertEffect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/image/src/Tests/ImageEffectsTest.php \Drupal\image\Tests\ImageEffectsTest::testConvertEffect()

Tests the ConvertImageEffect plugin.

File

core/modules/image/src/Tests/ImageEffectsTest.php, line 94
Contains \Drupal\image\Tests\ImageEffectsTest.

Class

ImageEffectsTest
Tests that the image effects pass parameters to the toolkit correctly.

Namespace

Drupal\image\Tests

Code

function testConvertEffect() {

  // Test jpeg.
  $this
    ->assertImageEffect('image_convert', array(
    'extension' => 'jpeg',
  ));
  $this
    ->assertToolkitOperationsCalled(array(
    'convert',
  ));

  // Check the parameters.
  $calls = $this
    ->imageTestGetAllCalls();
  $this
    ->assertEqual($calls['convert'][0][0], 'jpeg', 'Extension was passed correctly');
}