Browse Source

added bundle controller routing test.

Taylor Otwell 13 years ago
parent
commit
021a48552d

+ 12 - 0
tests/cases/laravel/routing.test.php

@@ -91,7 +91,19 @@ class RoutingTest extends PHPUnit_Framework_TestCase {
 	 */
 	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']);
+	}
+
 }

+ 6 - 0
tests/laravel/bundles/dashboard/controllers/panel.php

@@ -0,0 +1,6 @@
+<?php
+
+class Dashboard_Panel_Controller extends Controller {
+
+
+}