function ToolkitGdTest::setUp
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::setUp()
- 8.9.x core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php \Drupal\KernelTests\Core\Image\ToolkitGdTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Image/ ToolkitGdTest.php, line 58
Class
- ToolkitGdTest
- Tests for the GD image toolkit.
Namespace
Drupal\KernelTests\Core\ImageCode
protected function setUp() : void {
parent::setUp();
$this->installConfig([
'system',
]);
// Set the image factory service.
$this->imageFactory = $this->container
->get('image.factory');
$this->assertEquals('gd', $this->imageFactory
->getToolkitId(), 'The image factory is set to use the \'gd\' image toolkit.');
// Prepare a directory for test file results.
$this->directory = 'public://image_test';
\Drupal::service('file_system')->prepareDirectory($this->directory, FileSystemInterface::CREATE_DIRECTORY);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.