You are here

public function PageManagerRoutingTest::providerTestRouteFilter in Page Manager 8

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/PageManagerRoutingTest.php \Drupal\Tests\page_manager\Kernel\PageManagerRoutingTest::providerTestRouteFilter()

File

tests/src/Kernel/PageManagerRoutingTest.php, line 121

Class

PageManagerRoutingTest
Integration test for Page Manager routing.

Namespace

Drupal\Tests\page_manager\Kernel

Code

public function providerTestRouteFilter() {
  $data = [];
  $data['custom'] = [
    '/custom/entity_test/1',
    'page_manager.page_view_custom_entity_test_view_custom_entity_test_view_variant',
  ];
  $data['no_format'] = [
    '/entity_test/1',
    'entity.entity_test.canonical',
  ];
  $data['format_added_after'] = [
    '/entity_test/1?_format=json',
    'entity.entity_test.canonical.json',
  ];
  $data['format_added_before'] = [
    '/entity_test/1?_format=xml',
    'entity.entity_test.canonical.xml',
  ];
  $data['same_pattern_no_match'] = [
    '/entity_test/add',
    'entity.entity_test.add_form',
  ];
  $data['failed_selection'] = [
    '/entity_test/manage/1/edit',
    'entity.entity_test.edit_form',
  ];
  $data['access_denied'] = [
    '/entity_test/delete/entity_test/1',
    NULL,
  ];
  return $data;
}