You are here

public function WebformBreadcrumbBuilderTest::testBuildSubmissions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/Breadcrumb/WebformBreadcrumbBuilderTest.php \Drupal\Tests\webform\Kernel\Breadcrumb\WebformBreadcrumbBuilderTest::testBuildSubmissions()

Test build submissions breadcrumbs.

File

tests/src/Kernel/Breadcrumb/WebformBreadcrumbBuilderTest.php, line 401

Class

WebformBreadcrumbBuilderTest
Test webform breadcrumb builder.

Namespace

Drupal\Tests\webform\Kernel\Breadcrumb

Code

public function testBuildSubmissions() {
  $route_match = $this
    ->getMockRouteMatch('entity.webform_submission.canonical', [
    [
      'webform_submission',
      $this->webformSubmissionAccess,
    ],
  ]);
  $links = [
    Link::createFromRoute('Home', '<front>'),
    Link::createFromRoute('Administration', 'system.admin'),
    Link::createFromRoute('Structure', 'system.admin_structure'),
    Link::createFromRoute('Webforms', 'entity.webform.collection'),
    Link::createFromRoute($this->webform
      ->label(), 'entity.webform.canonical', [
      'webform' => $this->webform
        ->id(),
    ]),
    Link::createFromRoute('Results', 'entity.webform.results_submissions', [
      'webform' => $this->webform
        ->id(),
    ]),
  ];
  $this
    ->assertLinks($route_match, $links);
}