X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FEnhancer%2FEntityRevisionRouteEnhancerTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FEnhancer%2FEntityRevisionRouteEnhancerTest.php;h=4d1883a4476cc51cc2c1f994792b1dd00709bd34;hp=aa0897b22c8c28079fdd4d6f019efe7459a073ef;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php b/web/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php index aa0897b22..4d1883a44 100644 --- a/web/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php +++ b/web/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php @@ -30,20 +30,16 @@ class EntityRevisionRouteEnhancerTest extends UnitTestCase { } /** - * @covers ::applies - * @dataProvider providerTestApplies + * @covers ::enhance */ - public function testApplies(Route $route, $expected) { - $this->assertEquals($expected, $this->routeEnhancer->applies($route)); - } + public function testEnhanceWithoutParameter() { + $route = new Route('/test-path/{entity_test}'); - public function providerTestApplies() { - $data = []; - $data['no-parameter'] = [new Route('/test-path'), FALSE]; - $data['none-revision-parameters'] = [new Route('/test-path/{entity_test}', [], [], ['parameters' => ['entity_test' => ['type' => 'entity:entity_test']]]), FALSE]; - $data['with-revision-parameter'] = [new Route('/test-path/{entity_test_revision}', [], [], ['parameters' => ['entity_test_revision' => ['type' => 'entity_revision:entity_test']]]), TRUE]; + $request = Request::create('/test-path'); - return $data; + $defaults = []; + $defaults[RouteObjectInterface::ROUTE_OBJECT] = $route; + $this->assertEquals($defaults, $this->routeEnhancer->enhance($defaults, $request)); } /**