[ticket/12504] Remove unused request object from avatar manager test

PHPBB3-12504
[ticket/12504] Use defined variables

PHPBB3-12504
[ticket/12504] Use local variables where possible

PHPBB3-12504