public function WebformBreadcrumbBuilderTest::testBuildUserSubmissions 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::testBuildUserSubmissions()
Test build user submissions breadcrumbs.
File
- tests/
src/ Kernel/ Breadcrumb/ WebformBreadcrumbBuilderTest.php, line 419
Class
- WebformBreadcrumbBuilderTest
- Test webform breadcrumb builder.
Namespace
Drupal\Tests\webform\Kernel\BreadcrumbCode
public function testBuildUserSubmissions() {
// Check without view own access.
$route_match = $this
->getMockRouteMatch('entity.webform.user.submission', [
[
'webform_submission',
$this->webformSubmission,
],
]);
$links = [
Link::createFromRoute($this->webform
->label(), 'entity.webform.canonical', [
'webform' => $this->webform
->id(),
]),
];
$this
->assertLinks($route_match, $links);
// Check with view own access.
$route_match = $this
->getMockRouteMatch('entity.webform.user.submission', [
[
'webform_submission',
$this->webformSubmissionAccess,
],
]);
$links = [
Link::createFromRoute($this->webform
->label(), 'entity.webform.canonical', [
'webform' => $this->webform
->id(),
]),
Link::createFromRoute('Submissions', 'entity.webform.user.submissions', [
'webform' => $this->webform
->id(),
]),
];
$this
->assertLinks($route_match, $links);
}