Commit 659a09a1 authored by Taylor Otwell's avatar Taylor Otwell

added mroe tests for route.

parent 5c03c1de
...@@ -15,12 +15,19 @@ class RouteTest extends PHPUnit_Framework_TestCase { ...@@ -15,12 +15,19 @@ class RouteTest extends PHPUnit_Framework_TestCase {
* *
* @group laravel * @group laravel
*/ */
public function testHandlesReturnsTrueWhenRouteHandlesTheGivenURI() public function testHandlesIndicatesIfTheRouteHandlesAGivenURI()
{ {
$route = new Laravel\Routing\Route('GET /', array('handles' => array('foo/bar'))); $route = new Laravel\Routing\Route('GET /', array('handles' => array('foo/bar')));
$this->assertTrue($route->handles('foo/*')); $this->assertTrue($route->handles('foo/*'));
$this->assertTrue($route->handles('foo/bar')); $this->assertTrue($route->handles('foo/bar'));
$this->assertFalse($route->handles('baz'));
$route = new Laravel\Routing\Route('GET /', array('handles' => array('/', 'home')));
$this->assertTrue($route->handles('/'));
$this->assertTrue($route->handles('home'));
$this->assertFalse($route->handles('foo'));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment