diff --git a/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php b/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php new file mode 100644 index 0000000..3592780 --- /dev/null +++ b/core/modules/views/tests/src/Unit/Plugin/display/PageTest.php @@ -0,0 +1,44 @@ +setDefault('view_id', 'test_view'); + $route->setOption('_view_display_plugin_id', 'page'); + $route->setOption('_view_display_show_admin_links', TRUE); + + $result = Page::buildBasicRenderable('test_view', 'page_1', [], $route); + + $this->assertEquals('test_view', $result['#view_id']); + $this->assertEquals('page', $result['#view_display_plugin_id']); + $this->assertEquals(TRUE, $result['#view_display_show_admin_links']); + } + + /** + * @covers ::buildBasicRenderable + * @expectedException \BadFunctionCallException + */ + public function testBuildBasicRenderableWithMissingRoute() { + Page::buildBasicRenderable('test_view', 'page_1', []); + } + +}