You are here

public function BlazyManagerTest::providerTestPreRenderImage in Blazy 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/BlazyManagerTest.php \Drupal\Tests\blazy\Kernel\BlazyManagerTest::providerTestPreRenderImage()

Provide test cases for ::testPreRenderImage().

Return value

array An array of tested data.

File

tests/src/Kernel/BlazyManagerTest.php, line 74

Class

BlazyManagerTest
Tests the Blazy manager methods.

Namespace

Drupal\Tests\blazy\Kernel

Code

public function providerTestPreRenderImage() {
  $data[] = [
    [
      'content_url' => 'node/1',
      'media_switch' => 'content',
    ],
    FALSE,
  ];
  $data[] = [
    [
      'lightbox' => TRUE,
      'media_switch' => 'photobox',
      'responsive_image_style' => 'blazy_responsive_test',
    ],
    TRUE,
  ];
  $data[] = [
    [
      'box_style' => 'blazy_crop',
      'box_media_style' => 'large',
      'box_caption' => 'custom',
      'box_caption_custom' => '[node:field_text_multiple]',
      'embed_url' => '//www.youtube.com/watch?v=E03HFA923kw',
      'lightbox' => TRUE,
      'media_switch' => 'blazy_test',
      'scheme' => 'youtube',
      'type' => 'video',
    ],
    FALSE,
  ];
  return $data;
}