[BUGFIX] Fix failing test in StorageRepositoryTest

With #50803 the usage of the constant TYPO3_MODE was introduced. This
leads to the failing test, after the constant can not be redefined
for test purposes.

To work around this, a method that can be mocked is introduced, and
specifically set to "FE" for this test to work again.

Resolves: #50809
Relates: #50803
Releases: 6.2, 6.1, 6.0
Change-Id: I7319d8ccef530feff69a7f9885df24dba0beed4d
Reviewed-on: https://review.typo3.org/22842
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes