function ToolkitTest::testGetAvailableToolkits
Tests that the toolkit manager only returns available toolkits.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Image/ ToolkitTest.php, line 56  
Class
- ToolkitTest
 - Tests the image toolkit.
 
Namespace
Drupal\KernelTests\Core\ImageCode
public function testGetAvailableToolkits() : void {
  $manager = $this->container
    ->get('image.toolkit.manager');
  $toolkits = $manager->getAvailableToolkits();
  $this->assertArrayHasKey('test', $toolkits);
  $this->assertArrayHasKey('test:derived_toolkit', $toolkits);
  $this->assertArrayNotHasKey('broken', $toolkits);
  $this->assertToolkitOperationsCalled([]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.