Commit 1264a7dd by Taylor Otwell

added after filter tests.

parent 33e1bd4f
......@@ -23,4 +23,26 @@ class RouteFilterTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(Filter::run(array('parameters:1,2'), array(3), true), '3|1|2');
}
public function test_after_filters_are_called()
{
$filters = array(
'after1' => function()
{
define('ROUTE_FILTER_AFTER_1', 1);
},
'after2' => function()
{
define('ROUTE_FILTER_AFTER_2', 2);
},
);
Filter::register($filters);
Filter::run(array('after1', 'after2'));
$this->assertTrue(defined('ROUTE_FILTER_AFTER_1'));
$this->assertTrue(defined('ROUTE_FILTER_AFTER_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