You are here

public function ImageTest::testConvert in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testConvert()

Tests \Drupal\Core\Image\Image::convert().

File

core/tests/Drupal/Tests/Core/Image/ImageTest.php, line 394
Contains \Drupal\Tests\Core\Image\ImageTest.

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testConvert() {
  $this
    ->getTestImageForOperation('Convert');
  $this->toolkitOperation
    ->expects($this
    ->once())
    ->method('execute')
    ->will($this
    ->returnArgument(0));
  $ret = $this->image
    ->convert('png');
  $this
    ->assertEquals('png', $ret['extension']);
}