You are here

protected function ImageEffectsTest::assertImageEffect 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::assertImageEffect()

Asserts the effect processing of an image effect plugin.

Parameters

string $effect_name: The name of the image effect to test.

array $data: The data to pass to the image effect.

Return value

bool TRUE if the assertion succeeded, FALSE otherwise.

7 calls to ImageEffectsTest::assertImageEffect()
ImageEffectsTest::testConvertEffect in core/modules/image/src/Tests/ImageEffectsTest.php
Tests the ConvertImageEffect plugin.
ImageEffectsTest::testCropEffect in core/modules/image/src/Tests/ImageEffectsTest.php
Test the image_crop_effect() function.
ImageEffectsTest::testDesaturateEffect in core/modules/image/src/Tests/ImageEffectsTest.php
Test the image_desaturate_effect() function.
ImageEffectsTest::testResizeEffect in core/modules/image/src/Tests/ImageEffectsTest.php
Test the image_resize_effect() function.
ImageEffectsTest::testRotateEffect in core/modules/image/src/Tests/ImageEffectsTest.php
Test the image_rotate_effect() function.

... See full list

File

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

Class

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

Namespace

Drupal\image\Tests

Code

protected function assertImageEffect($effect_name, array $data) {
  $effect = $this->manager
    ->createInstance($effect_name, array(
    'data' => $data,
  ));
  return $this
    ->assertTrue($effect
    ->applyEffect($this->image), 'Function returned the expected value.');
}