You are here

protected function BlazyFormatterTest::setUp in Blazy 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/BlazyFormatterTest.php \Drupal\Tests\blazy\Kernel\BlazyFormatterTest::setUp()

Set the default field storage backend for fields created during tests.

Overrides BlazyKernelTestBase::setUp

File

tests/src/Kernel/BlazyFormatterTest.php, line 21

Class

BlazyFormatterTest
Tests the Blazy image formatter.

Namespace

Drupal\Tests\blazy\Kernel

Code

protected function setUp() {
  parent::setUp();
  $data['fields'] = [
    'field_video' => 'image',
    'field_image' => 'image',
    'field_id' => 'text',
  ];

  // Create contents.
  $bundle = $this->bundle;
  $this
    ->setUpContentTypeTest($bundle, $data);
  $data['settings'] = $this
    ->getFormatterSettings();
  $this->display = $this
    ->setUpFormatterDisplay($bundle, $data);
  $this
    ->setUpContentWithItems($bundle);
  $this
    ->setUpRealImage();
  $this->formatterInstance = $this
    ->getFormatterInstance();
}