Add tests app/router for new methods.
This commit is contained in:
@ -77,4 +77,17 @@ class RouteTest extends PHPUnit_Framework_TestCase
|
||||
$this->setExpectedException('PHPUnit_Framework_Error');
|
||||
$route->match('');
|
||||
}
|
||||
|
||||
public function testGetUri()
|
||||
{
|
||||
$route = 'myroute';
|
||||
$route_mock = $this->getMockBuilder('Route')
|
||||
->disableOriginalConstructor()
|
||||
->setMethods(array('__construct'))
|
||||
->getMock();
|
||||
$reflection = new ReflectionProperty('Route', 'route');
|
||||
$reflection->setAccessible(true);
|
||||
$reflection->setValue($route_mock, $route);
|
||||
$this->assertEquals('/' . $route, $route_mock->getUri());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user