You are here

protected function ConsumerImageSylesFunctionalTest::setUp in Consumer Image Styles 4.x

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

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ConsumerImageSylesFunctionalTest.php, line 80

Class

ConsumerImageSylesFunctionalTest
@group consumer_image_styles

Namespace

Drupal\Tests\consumer_image_styles\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->contentType = $this
    ->createContentType();
  $this->imageFieldName = $this
    ->getRandomGenerator()
    ->word(8);
  $this->user = $this
    ->drupalCreateUser();
  $this
    ->createImageField($this->imageFieldName, $this->contentType
    ->id());
  $this
    ->overrideResources();
  drupal_flush_all_caches();
}