You are here

public function EntityRevisionRouteEnhancerTest::testAppliesWithRevisionParameters in Entity API 8.0

@covers ::applies

File

tests/src/Unit/RouteEnhancer/EntityRevisionRouteEnhancerTest.php, line 57
Contains \Drupal\Tests\Unit\RouteEnhancer\EntityRevisionRouteEnhancerTest.

Class

EntityRevisionRouteEnhancerTest
@coversDefaultClass \Drupal\entity\RouteEnhancer\EntityRevisionRouteEnhancer @group entity

Namespace

Drupal\Tests\Unit\RouteEnhancer

Code

public function testAppliesWithRevisionParameters() {
  $route = new Route('/test-path/{entity_test_revision}', [], [], [
    'parameters' => [
      'entity_test_revision' => [
        'type' => 'entity_revision:entity_test',
      ],
    ],
  ]);
  $this
    ->assertTrue($this->routeEnhancer
    ->applies($route));
}