commit 490437716124cc77001bdadb1043d0ba0b0c0bf6 Author: Klaus Purer Date: Thu Nov 8 16:48:56 2012 +0100 Fixed dynamic route test with RouterTestBundle. diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php index 04321cd..74f5fe9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Routing/RouterTest.php @@ -99,7 +99,7 @@ public function testDynamicRoute() { drupal_container()->get('router.builder')->rebuild(); $this->drupalGet('router_test/' . $value); $this->assertResponse(200); - $this->assertRaw($value, 'The correct string was returned because the route was successful.'); + $this->assertRaw('test5', 'The correct string was returned because the route was successful.'); } } diff --git a/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouteSubscriber.php b/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouteSubscriber.php index 4bf2e33..8e7bb6d 100644 --- a/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouteSubscriber.php +++ b/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouteSubscriber.php @@ -9,6 +9,7 @@ use \Drupal\Core\Routing\RouteBuildEvent; use \Drupal\Core\Routing\RoutingEvents; use \Symfony\Component\EventDispatcher\EventSubscriberInterface; +use \Symfony\Component\Routing\Route; /** * Listens to the dynamic route event and add a test route. diff --git a/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouterTestBundle.php b/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouterTestBundle.php new file mode 100644 index 0000000..41ca236 --- /dev/null +++ b/core/modules/system/tests/modules/router_test/lib/Drupal/router_test/RouterTestBundle.php @@ -0,0 +1,24 @@ +register('router_test.subscriber', 'Drupal\router_test\RouteSubscriber')->addTag('event_subscriber'); + } +} diff --git a/core/modules/system/tests/modules/router_test/router_test.module b/core/modules/system/tests/modules/router_test/router_test.module index 76a8694..b3d9bbc 100644 --- a/core/modules/system/tests/modules/router_test/router_test.module +++ b/core/modules/system/tests/modules/router_test/router_test.module @@ -1,11 +1 @@ get('dispatcher')->addSubscriber(new RouteSubscriber()); -}