You are here

public function WebformBreadcrumbBuilderTest::testBuildTemplates in Webform 8.5

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

Test build templates breadcrumbs.

File

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

Class

WebformBreadcrumbBuilderTest
Test webform breadcrumb builder.

Namespace

Drupal\Tests\webform\Kernel\Breadcrumb

Code

public function testBuildTemplates() {
  $route_match = $this
    ->getMockRouteMatch('entity.webform.canonical', [
    [
      'webform',
      $this->webformTemplate,
    ],
  ]);
  $links = [
    Link::createFromRoute('Home', '<front>'),
    Link::createFromRoute('Administration', 'system.admin'),
    Link::createFromRoute('Structure', 'system.admin_structure'),
    Link::createFromRoute('Webforms', 'entity.webform.collection'),
    Link::createFromRoute('Templates', 'entity.webform.templates'),
  ];
  $this
    ->assertLinks($route_match, $links);
}