summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoman Tsiupa <draconyster@gmail.com>2013-02-26 22:30:07 +0200
committerRoman Tsiupa <draconyster@gmail.com>2013-02-26 22:30:07 +0200
commit5401ac6ec6da5ad70c5ca73753447cca859699a2 (patch)
tree2dbbcf6f0f7644cda2adcfb26b1dbd9d13bd2910 /tests
parent1690da36a5c5ad309de7117f3d8b52f045ebc9bf (diff)
downloadPHPixie-5401ac6ec6da5ad70c5ca73753447cca859699a2.zip
PHPixie-5401ac6ec6da5ad70c5ca73753447cca859699a2.tar.gz
PHPixie-5401ac6ec6da5ad70c5ca73753447cca859699a2.tar.bz2
Support for optional parameters
Diffstat (limited to 'tests')
-rw-r--r--tests/system/routeTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/system/routeTest.php b/tests/system/routeTest.php
index 58d0295..dc22931 100644
--- a/tests/system/routeTest.php
+++ b/tests/system/routeTest.php
@@ -113,11 +113,12 @@ class RoteTest extends PHPUnit_Framework_TestCase
*/
public function testUrl()
{
- Route::add('url', '/<controller>/<action>(/<id>)', array(
+ 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)));
+ $this->assertEquals('/home/index/5', $route-> url(array('id' => 5)));
+ $this->assertEquals('/home/index', $route->url());
}
}