You are here

function ImageToolkitUnitTest::testLoad in SimpleTest 7

Test the image_load() function.

File

tests/image.test, line 94
Unit tests for the Drupal Form 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), t('Returned an object.'));
  $this
    ->assertEqual($this->toolkit, $image->toolkit, t('Image had toolkit set.'));
  $this
    ->assertToolkitOperationsCalled(array(
    'load',
    'get_info',
  ));
}