From 021a48552d245a05ef9623702ffa6bee8f2948fa Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 27 Jan 2012 11:37:35 -0600 Subject: [PATCH] added bundle controller routing test. --- tests/cases/laravel/routing.test.php | 12 ++++++++++++ .../laravel/bundles/dashboard/controllers/panel.php | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/laravel/bundles/dashboard/controllers/panel.php diff --git a/tests/cases/laravel/routing.test.php b/tests/cases/laravel/routing.test.php index a747fe79..1e9a824e 100644 --- a/tests/cases/laravel/routing.test.php +++ b/tests/cases/laravel/routing.test.php @@ -91,7 +91,19 @@ public function testBasicRouteToControllerIsRouted() */ public function testRoutesToBundlesCanBeResolved() { + $this->assertNull(Router::route('GET', 'dashboard/foo')); $this->assertEquals('GET /dashboard', Router::route('GET', 'dashboard')->key); } + /** + * Test bundle controller route resolution. + * + * @group laravel + */ + public function testBundleControllersCanBeResolved() + { + $this->assertEquals('dashboard::panel@index', Router::route('GET', 'dashboard/panel')->action['uses']); + $this->assertEquals('dashboard::panel@show', Router::route('GET', 'dashboard/panel/show')->action['uses']); + } + } \ No newline at end of file diff --git a/tests/laravel/bundles/dashboard/controllers/panel.php b/tests/laravel/bundles/dashboard/controllers/panel.php new file mode 100644 index 00000000..f3631701 --- /dev/null +++ b/tests/laravel/bundles/dashboard/controllers/panel.php @@ -0,0 +1,6 @@ +