You are here

public function BlazyManagerTest::providerTestGetEntityView in Blazy 8

Provide test cases for ::testGetEntityView().

Return value

array An array of tested data.

File

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

Class

BlazyManagerTest
Tests the Blazy manager methods.

Namespace

Drupal\Tests\blazy\Kernel

Code

public function providerTestGetEntityView() {
  return [
    'Entity test' => [
      'entity',
      '',
      'Entity test has no entity_test_view(), yet it has view builder.',
      TRUE,
    ],
    'Node' => [
      'node',
      '',
      'Node has node_view() taking precedence over view builder.',
      TRUE,
    ],
    'Responsive image' => [
      'responsive_image',
      'This is some fallback text.',
      'Responsive image has no view builder. Fallback to text.',
      TRUE,
    ],
    'Image' => [
      'image',
      '',
      'Image is not an instance of EntityInterface, returns false.',
      FALSE,
    ],
  ];
}