function ImageStyleTest::setUp

Same name and namespace in other branches
  1. 11.x core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
  2. 10 core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
  3. 9 core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
  4. 8.9.x core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/image/tests/src/Unit/ImageStyleTest.php, line 91

Class

ImageStyleTest
Tests Drupal\image\Entity\ImageStyle.

Namespace

Drupal\Tests\image\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->entityTypeId = $this->randomMachineName();
  $provider = $this->randomMachineName();
  $this->entityType = $this->createStub(EntityTypeInterface::class);
  $this->entityType
    ->method('getProvider')
    ->willReturn($provider);
  $this->entityTypeManager = $this->createStub(EntityTypeManagerInterface::class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.