function ImageTest::testRotate

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testRotate()
  2. 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testRotate()
  3. 11.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testRotate()

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

File

core/tests/Drupal/Tests/Core/Image/ImageTest.php, line 474

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testRotate() : void {
  $this->getTestImageForOperation('Rotate');
  $this->toolkitOperation
    ->expects($this->once())
    ->method('execute')
    ->willReturnArgument(0);
  $ret = $this->image
    ->rotate(90);
  $this->assertEquals(90, $ret['degrees']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.