You are here

public function PanelizerEntityViewBuilderTest::testViewMultiple in Panelizer 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/PanelizerEntityViewBuilderTest.php \Drupal\Tests\panelizer\Unit\PanelizerEntityViewBuilderTest::testViewMultiple()
  2. 8.3 tests/src/Unit/PanelizerEntityViewBuilderTest.php \Drupal\Tests\panelizer\Unit\PanelizerEntityViewBuilderTest::testViewMultiple()

Tests viewMultiple().

@covers ::viewMultiple

File

tests/src/Unit/PanelizerEntityViewBuilderTest.php, line 308

Class

PanelizerEntityViewBuilderTest
Tests the PanelizerEntityViewBuilder.

Namespace

Drupal\Tests\panelizer\Unit

Code

public function testViewMultiple() {
  $data = $this
    ->setupView();
  $entities = $data['entities'];
  $expected = $data['expected'];
  $this->fallbackViewBuilder
    ->viewMultiple([
    234 => $entities[234],
  ], 'full', 'pl')
    ->willReturn([
    234 => [
      '#markup' => 'Fallback',
    ],
  ]);
  $this
    ->assertEquals($expected, $this->entityViewBuilder
    ->viewMultiple($entities, 'full', 'pl'));
}