Commit 98d351b9 authored by Taylor Otwell's avatar Taylor Otwell

added route filter tests.

parent e05b05a3
<?php use Laravel\Routing\Filter;
class RouteFilterTest extends PHPUnit_Framework_TestCase {
public function test_simple_filters_can_be_called()
{
$filters = array(
'simple' => function()
{
return 'simple';
},
'parameters' => function($one, $two)
{
return $one.'|'.$two;
},
);
Filter::register($filters);
$this->assertEquals(Filter::run(array('simple'), array(), true), 'simple');
$this->assertEquals(Filter::run(array('parameters'), array(1, 2), true), '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