You are here

protected function ToolkitTestBase::getImage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Image/ToolkitTestBase.php \Drupal\system\Tests\Image\ToolkitTestBase::getImage()

Sets up an image with the custom toolkit.

Return value

\Drupal\Core\Image\ImageInterface The image object.

2 calls to ToolkitTestBase::getImage()
ToolkitTest::testLoad in core/modules/system/src/Tests/Image/ToolkitTest.php
Tests Image's methods.
ToolkitTestBase::setUp in core/modules/system/src/Tests/Image/ToolkitTestBase.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/system/src/Tests/Image/ToolkitTestBase.php, line 69
Contains \Drupal\system\Tests\Image\ToolkitTestBase.

Class

ToolkitTestBase
Base class for image manipulation testing.

Namespace

Drupal\system\Tests\Image

Code

protected function getImage() {
  $image = $this->imageFactory
    ->get($this->file, 'test');
  $this
    ->assertTrue($image
    ->isValid(), 'Image file was parsed.');
  return $image;
}