You are here

public function ToolkitImagemagickTest::setUp in ImageMagick 8

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ToolkitImagemagickTest.php \Drupal\Tests\imagemagick\Functional\ToolkitImagemagickTest::setUp()
  2. 8.2 tests/src/Functional/ToolkitImagemagickTest.php \Drupal\Tests\imagemagick\Functional\ToolkitImagemagickTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ToolkitImagemagickTest.php, line 65

Class

ToolkitImagemagickTest
Tests that core image manipulations work properly through Imagemagick.

Namespace

Drupal\Tests\imagemagick\Functional

Code

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';
}