[TASK][TEST] Skip tests if environment is not properly set up

Change-Id: I9528765a5ce9bc2066434c3427f6f909c1df8f8e
Reviewed-on: https://review.typo3.org/24770
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers