added mroe tests for route.

This commit is contained in:
Taylor Otwell 2012-01-18 11:28:12 -06:00
parent 5c03c1de56
commit 659a09a11b
1 changed files with 8 additions and 1 deletions

View File

@ -15,12 +15,19 @@ public function tearDown()
* *
* @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'));
} }
} }