Rewrite test for Icinga\Web\Form

refs #6011
Rewrite test for Icinga\Web\Hook

refs #6011