public function ToolkitImagemagickTest::setUp in ImageMagick 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/ToolkitImagemagickTest.php \Drupal\Tests\imagemagick\Functional\ToolkitImagemagickTest::setUp()
- 8 tests/src/Functional/ToolkitImagemagickTest.php \Drupal\Tests\imagemagick\Functional\ToolkitImagemagickTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ToolkitImagemagickTest.php, line 50
Class
- ToolkitImagemagickTest
- Tests that core image manipulations work properly through Imagemagick.
Namespace
Drupal\Tests\imagemagick\FunctionalCode
public function setUp() {
parent::setUp();
// Create an admin user.
$admin_user = $this
->drupalCreateUser([
'administer site configuration',
]);
$this
->drupalLogin($admin_user);
// Set the image factory.
$this->imageFactory = $this->container
->get('image.factory');
// Prepare a directory for test file results.
$this->testDirectory = 'public://imagetest';
// Prepare directory.
file_unmanaged_delete_recursive($this->testDirectory);
file_prepare_directory($this->testDirectory, FILE_CREATE_DIRECTORY);
}