Rewrite test for Icinga\Web\Url and fix some bugs

refs #6011
Fix errors in tests

refs #6011