function ImageToolkitUnitTest::testResize
Test the image_resize() function.
File
-
modules/
simpletest/ tests/ image.test, line 119
Class
- ImageToolkitUnitTest
- Test that the functions in image.inc correctly pass data to the toolkit.
Code
function testResize() {
$this->assertTrue(image_resize($this->image, 1, 2), 'Function returned the expected value.');
$this->assertToolkitOperationsCalled(array(
'resize',
));
// Check the parameters.
$calls = image_test_get_all_calls();
$this->assertEqual($calls['resize'][0][1], 1, 'Width was passed correctly');
$this->assertEqual($calls['resize'][0][2], 2, 'Height was passed correctly');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.