You are here

function ToolkitTest::testGetAvailableToolkits in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Image/ToolkitTest.php \Drupal\system\Tests\Image\ToolkitTest::testGetAvailableToolkits()

Check that ImageToolkitManager::getAvailableToolkits() only returns available toolkits.

File

core/modules/system/src/Tests/Image/ToolkitTest.php, line 20
Contains \Drupal\system\Tests\Image\ToolkitTest.

Class

ToolkitTest
Tests image toolkit functions.

Namespace

Drupal\system\Tests\Image

Code

function testGetAvailableToolkits() {
  $manager = $this->container
    ->get('image.toolkit.manager');
  $toolkits = $manager
    ->getAvailableToolkits();
  $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());
}