function ToolkitTest::testGetAvailableToolkits

Check that hook_image_toolkits() is called and only available toolkits are returned.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Image/ToolkitTest.php, line 26
Definition of Drupal\system\Tests\Image\ToolkitTest.

Class

ToolkitTest
Test that the functions in image.inc correctly pass data to the toolkit.

Namespace

Drupal\system\Tests\Image

Code

function testGetAvailableToolkits() {
  $toolkits = image_get_available_toolkits();
  $this
    ->assertTrue(isset($toolkits['test']), 'The working toolkit was returned.');
  $this
    ->assertFalse(isset($toolkits['broken']), 'The toolkit marked unavailable was not returned');
  $this
    ->assertToolkitOperationsCalled(array());
}