public testApiRemoveHandler_RemovesRuleHandler ( ) |
public function testApiRemoveHandler_RemovesRuleHandler()
{
$router = $this->createRouter();
$matcher = function () {
};
$handler = function () {
};
$router->addRule($matcher, $handler);
$rules = $this->getProtectedProperty($router, 'rules');
$this->assertCount(1, $rules);
$router->removeHandler('rules', 0);
$rules = $this->getProtectedProperty($router, 'rules');
$this->assertCount(0, $rules);
}