You are here

public function PageTest::testBuildBasicRenderable in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Unit/Plugin/display/PageTest.php \Drupal\Tests\views\Unit\Plugin\display\PageTest::testBuildBasicRenderable()
  2. 10 core/modules/views/tests/src/Unit/Plugin/display/PageTest.php \Drupal\Tests\views\Unit\Plugin\display\PageTest::testBuildBasicRenderable()

@covers ::buildBasicRenderable

File

core/modules/views/tests/src/Unit/Plugin/display/PageTest.php, line 18

Class

PageTest
@coversDefaultClass \Drupal\views\Plugin\views\display\Page @group views

Namespace

Drupal\Tests\views\Unit\Plugin\display

Code

public function testBuildBasicRenderable() {
  $route = new Route('/test-view');
  $route
    ->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']);
}