You are here

private function BlazyViewsFileTest::buildContents in Blazy 8

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

Build contents.

1 call to BlazyViewsFileTest::buildContents()
BlazyViewsFileTest::todoTestBlazyViews in tests/src/Kernel/Views/BlazyViewsFileTest.php
Make sure that the HTML list style markup is correct.

File

tests/src/Kernel/Views/BlazyViewsFileTest.php, line 46

Class

BlazyViewsFileTest
Test Blazy Views integration.

Namespace

Drupal\Tests\blazy\Kernel\Views

Code

private function buildContents() {
  $this
    ->setUpRealImage();
  $bundle = $this->bundle;
  $settings['image_settings'] = [
    'iframe_lazy' => TRUE,
    'image_style' => 'blazy_crop',
    'media_switch' => 'blazy_test',
    'ratio' => 'fluid',
    'view_mode' => 'default',
  ];
  $this
    ->setUpContentWithEntityReference($settings);

  // Create referencing entity.
  $this->referencingEntity = $this
    ->createReferencingEntity();
  $data['fields'] = $this
    ->getDefaultFields();

  // Create contents.
  $this
    ->setUpContentTypeTest($bundle, $data);
  $data['settings'] = $this
    ->getFormatterSettings();
  $data['settings']['breakpoints'] = $this
    ->getDataBreakpoints(TRUE);
  $display = $this
    ->setUpFormatterDisplay($bundle, $data);
  $display
    ->setComponent('field_image', [
    'type' => 'blazy',
    'settings' => $settings['image_settings'],
    'label' => 'hidden',
  ]);
  $display
    ->save();
  $this
    ->setUpContentWithItems($bundle);
}