public function WebformBreadcrumbBuilderTest::testBuildSourceEntityResults in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Kernel/Breadcrumb/WebformBreadcrumbBuilderTest.php \Drupal\Tests\webform\Kernel\Breadcrumb\WebformBreadcrumbBuilderTest::testBuildSourceEntityResults()
Test build source entity submissions breadcrumbs.
File
- tests/
src/ Kernel/ Breadcrumb/ WebformBreadcrumbBuilderTest.php, line 303
Class
- WebformBreadcrumbBuilderTest
- Test webform breadcrumb builder.
Namespace
Drupal\Tests\webform\Kernel\BreadcrumbCode
public function testBuildSourceEntityResults() {
$this
->setSourceEntity($this->nodeAccess);
$route_match = $this
->getMockRouteMatch('entity.node.webform_submission.canonical', [
[
'webform_submission',
$this->webformSubmissionAccess,
],
[
'webform',
$this->webform,
],
[
'node',
$this->node,
],
]);
$links = [
Link::createFromRoute('Home', '<front>'),
$this->node
->toLink(),
Link::createFromRoute('Results', 'entity.node.webform.results_submissions', [
'node' => 1,
]),
];
$this
->assertLinks($route_match, $links);
}