You are here

public function WebformBreadcrumbBuilderTest::testApplies 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::testApplies()

Tests WebformBreadcrumbBuilder::applies().

@dataProvider providerTestApplies @covers ::applies

Parameters

bool $expected: WebformBreadcrumbBuilder::applies() expected result.

string|null $route_name: (optional) A route name.

array $parameter_map: (optional) An array of parameter names and values.

File

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

Class

WebformBreadcrumbBuilderTest
Test webform breadcrumb builder.

Namespace

Drupal\Tests\webform\Kernel\Breadcrumb

Code

public function testApplies($expected, $route_name = NULL, array $parameter_map = []) {
  $route_match = $this
    ->getMockRouteMatch($route_name, $parameter_map);
  $this
    ->assertEquals($expected, $this->breadcrumbBuilder
    ->applies($route_match));
}