You are here

public function BlazyManagerUnitTest::providerTestPreRenderImage in Blazy 8

Provide test cases for ::testPreRenderImage().

Return value

array An array of tested data.

File

tests/src/Unit/BlazyManagerUnitTest.php, line 166

Class

BlazyManagerUnitTest
@coversDefaultClass \Drupal\blazy\BlazyManager

Namespace

Drupal\Tests\blazy\Unit

Code

public function providerTestPreRenderImage() {
  $data[] = [
    FALSE,
    '',
    '',
    TRUE,
    TRUE,
  ];
  $data[] = [
    TRUE,
    '',
    '',
    TRUE,
    TRUE,
  ];
  $data[] = [
    TRUE,
    'core/misc/druplicon.png',
    '',
    TRUE,
    TRUE,
  ];
  $data[] = [
    TRUE,
    'core/misc/druplicon.png',
    '<iframe src="//www.youtube.com/watch?v=E03HFA923kw" class="b-lazy"></iframe>',
    TRUE,
    FALSE,
  ];
  return $data;
}