function ImageEffectsTest::testRotateEffect
Same name in other branches
- 8.9.x core/modules/image/tests/src/Functional/ImageEffectsTest.php \Drupal\Tests\image\Functional\ImageEffectsTest::testRotateEffect()
- 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testRotateEffect()
- 11.x core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testRotateEffect()
Tests the image_rotate_effect() function.
File
-
core/
modules/ image/ tests/ src/ Kernel/ ImageEffectsTest.php, line 178
Class
- ImageEffectsTest
- Tests image effects.
Namespace
Drupal\Tests\image\KernelCode
public function testRotateEffect() {
// @todo Test also with 'random' === TRUE in #3040887.
// @see https://www.drupal.org/project/drupal/issues/3040887
$this->assertImageEffect([
'rotate',
], 'image_rotate', [
'degrees' => 90,
'bgcolor' => '#fff',
]);
// Check the parameters.
$calls = $this->imageTestGetAllCalls();
// Degrees were passed correctly.
$this->assertEquals(90, $calls['rotate'][0][0]);
// Background color was passed correctly.
$this->assertEquals('#fff', $calls['rotate'][0][1]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.