public function ImageEffectsTest::testRotateEffect in Drupal 8
Test the image_rotate_effect() function.
File
- core/
modules/ image/ tests/ src/ Functional/ ImageEffectsTest.php, line 159
Class
- ImageEffectsTest
- Tests that the image effects pass parameters to the toolkit correctly.
Namespace
Drupal\Tests\image\FunctionalCode
public function testRotateEffect() {
// @todo: need to test with 'random' => TRUE
$this
->assertImageEffect('image_rotate', [
'degrees' => 90,
'bgcolor' => '#fff',
]);
$this
->assertToolkitOperationsCalled([
'rotate',
]);
// Check the parameters.
$calls = $this
->imageTestGetAllCalls();
$this
->assertEqual($calls['rotate'][0][0], 90, 'Degrees were passed correctly');
$this
->assertEqual($calls['rotate'][0][1], '#fff', 'Background color was passed correctly');
}