[BUGFIX] Incomplete mocking in ext:frontend getImgResourceHook test

A global variable is reset to not call a sub section of the method
under test that may trigger errors.

Change-Id: If486523f231c7463804ac03a663834a820cdd3f1
Releases: 6.2
Resolves: #51581
Reviewed-on: https://review.typo3.org/23487
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn