You are here

public function ImageTest::testScaleWidth 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::testScaleWidth()

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

File

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

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testScaleWidth() {
  $this
    ->getTestImageForOperation('Scale');
  $this->toolkitOperation
    ->expects($this
    ->once())
    ->method('execute')
    ->will($this
    ->returnArgument(0));
  $ret = $this->image
    ->scale(44, NULL, FALSE);
  $this
    ->assertEquals(50, $ret['height']);
}