function ImageToolkitUnitTest::testLoad in Drupal 7
Test the image_load() function.
File
- modules/
simpletest/ tests/ image.test, line 101 - Tests for core image handling API.
Class
- ImageToolkitUnitTest
- Test that the functions in image.inc correctly pass data to the toolkit.
Code
function testLoad() {
$image = image_load($this->file, $this->toolkit);
$this
->assertTrue(is_object($image), 'Returned an object.');
$this
->assertEqual($this->toolkit, $image->toolkit, 'Image had toolkit set.');
$this
->assertToolkitOperationsCalled(array(
'load',
'get_info',
));
}