You are here

protected function ToolkitTestBase::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php \Drupal\FunctionalTests\Image\ToolkitTestBase::setUp()

Overrides BrowserTestBase::setUp

File

core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php, line 55

Class

ToolkitTestBase
Base class for image manipulation testing.

Namespace

Drupal\FunctionalTests\Image

Code

protected function setUp() {
  parent::setUp();

  // Set the image factory service.
  $this->imageFactory = $this->container
    ->get('image.factory');

  // Pick a file for testing.
  $file = current($this
    ->drupalGetTestFiles('image'));
  $this->file = $file->uri;

  // Setup a dummy image to work with.
  $this->image = $this
    ->getImage();

  // Clear out any hook calls.
  $this
    ->imageTestReset();
}