function EntityRevisionRouteEnhancerTest::testEnhanceWithoutParameter

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php \Drupal\Tests\Core\Enhancer\EntityRevisionRouteEnhancerTest::testEnhanceWithoutParameter()
  2. 8.9.x core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php \Drupal\Tests\Core\Enhancer\EntityRevisionRouteEnhancerTest::testEnhanceWithoutParameter()
  3. 10 core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php \Drupal\Tests\Core\Enhancer\EntityRevisionRouteEnhancerTest::testEnhanceWithoutParameter()

@covers ::enhance

File

core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php, line 37

Class

EntityRevisionRouteEnhancerTest
@coversDefaultClass \Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer @group Entity

Namespace

Drupal\Tests\Core\Enhancer

Code

public function testEnhanceWithoutParameter() : void {
    $route = new Route('/test-path/{entity_test}');
    $request = Request::create('/test-path');
    $defaults = [];
    $defaults[RouteObjectInterface::ROUTE_OBJECT] = $route;
    $this->assertEquals($defaults, $this->routeEnhancer
        ->enhance($defaults, $request));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.