added route test for handles method. fixed bug in route class.
This commit is contained in:
25
tests/cases/laravel/route.test.php
Normal file
25
tests/cases/laravel/route.test.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
class RouteTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Destroy the testing environment.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
Request::$route = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the Route::handles method.
|
||||
*
|
||||
* @group laravel
|
||||
*/
|
||||
public function testHandlesReturnsTrueWhenRouteHandlesTheGivenURI()
|
||||
{
|
||||
$route = new Laravel\Routing\Route('GET /', array('handles' => array('foo/bar')));
|
||||
|
||||
$this->assertTrue($route->handles('foo/bar'));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user