Commit 33e1bd4f by Taylor Otwell

added another route filter parameter test.

parent 212bbad1
...@@ -10,16 +10,17 @@ class RouteFilterTest extends PHPUnit_Framework_TestCase { ...@@ -10,16 +10,17 @@ class RouteFilterTest extends PHPUnit_Framework_TestCase {
return 'simple'; return 'simple';
}, },
'parameters' => function($one, $two) 'parameters' => function($one, $two, $three = null)
{ {
return $one.'|'.$two; return $one.'|'.$two.'|'.$three;
}, },
); );
Filter::register($filters); Filter::register($filters);
$this->assertEquals(Filter::run(array('simple'), array(), true), 'simple'); $this->assertEquals(Filter::run(array('simple'), array(), true), 'simple');
$this->assertEquals(Filter::run(array('parameters:1,2'), array(), true), '1|2'); $this->assertEquals(Filter::run(array('parameters:1,2'), array(), true), '1|2|');
$this->assertEquals(Filter::run(array('parameters:1,2'), array(3), true), '3|1|2');
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment