public function WebformBreadcrumbBuilderTest::testBuildHandlers in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Kernel/Breadcrumb/WebformBreadcrumbBuilderTest.php \Drupal\Tests\webform\Kernel\Breadcrumb\WebformBreadcrumbBuilderTest::testBuildHandlers()
Test build handler breadcrumbs.
File
- tests/
src/ Kernel/ Breadcrumb/ WebformBreadcrumbBuilderTest.php, line 382
Class
- WebformBreadcrumbBuilderTest
- Test webform breadcrumb builder.
Namespace
Drupal\Tests\webform\Kernel\BreadcrumbCode
public function testBuildHandlers() {
// Check source entity.
$route_match = $this
->getMockRouteMatch('entity.webform.handler.add_form', [
[
'webform',
$this->webform,
],
]);
$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('Emails / Handlers', 'entity.webform.handlers', [
'webform' => $this->webform
->id(),
]),
];
$this
->assertLinks($route_match, $links);
}