public function PanelizerEntityViewBuilderTest::testView in Panelizer 8.5
Same name and namespace in other branches
- 8.3 tests/src/Unit/PanelizerEntityViewBuilderTest.php \Drupal\Tests\panelizer\Unit\PanelizerEntityViewBuilderTest::testView()
- 8.4 tests/src/Unit/PanelizerEntityViewBuilderTest.php \Drupal\Tests\panelizer\Unit\PanelizerEntityViewBuilderTest::testView()
Tests view().
@covers ::view
File
- tests/
src/ Unit/ PanelizerEntityViewBuilderTest.php, line 291
Class
- PanelizerEntityViewBuilderTest
- Tests the PanelizerEntityViewBuilder.
Namespace
Drupal\Tests\panelizer\UnitCode
public function testView() {
$data = $this
->setupView();
$entities = $data['entities'];
$expected = $data['expected'];
$this->fallbackViewBuilder
->view($entities[234], 'full', 'pl')
->willReturn([
'#markup' => 'Fallback',
]);
$this
->assertEquals($expected[123], $this->entityViewBuilder
->view($entities[123], 'full', 'pl'));
$this
->assertEquals($expected[234], $this->entityViewBuilder
->view($entities[234], 'full', 'pl'));
}