summaryrefslogtreecommitdiffstats
path: root/tests/system/routeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/routeTest.php')
-rw-r--r--tests/system/routeTest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/system/routeTest.php b/tests/system/routeTest.php
index 1cda47b..58d0295 100644
--- a/tests/system/routeTest.php
+++ b/tests/system/routeTest.php
@@ -107,4 +107,17 @@ class RoteTest extends PHPUnit_Framework_TestCase
$this->assertEquals('test', $route-> params['alpha']);
$this->assertEquals(123,$route->params['num']);
}
+
+ /**
+ * @covers Route::url
+ */
+ public function testUrl()
+ {
+ Route::add('url', '/<controller>/<action>(/<id>)', array(
+ 'controller' => 'home',
+ 'action' => 'index'
+ ));
+ $route = Route::get('url');
+ $this->assertEquals('/home/index/5', $route->url(array('id'=>5)));
+ }
}