[BUGFIX] Fix failing unit tests for HTTP host check in CLI mode 23/30323/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 22 May 2014 09:33:09 +0000 (11:33 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 22 May 2014 11:43:44 +0000 (13:43 +0200)
commitc10bcb8d1b74191c33fe75d6c88fc9130a2357c8
tree36789fc8b04018d890de421191cb5d2f79817187
parentff4db83b6373dafac868ae5070bee28677c4a567
[BUGFIX] Fix failing unit tests for HTTP host check in CLI mode

The unit tests for the recent HTTP host fix are failing
if executed in CLI mode.
In CLI mode no server environments and HTTP headers are available,
that's why the behavior needs to know about the
test execution process.

We solve this by mocking allowed request types.

Resolves: #59022
Releases: 6.2, 6.1, 6.0
Change-Id: I3c93d181dcec5f34064798e7c31240877fde610d
Reviewed-on: https://review.typo3.org/30323
Reviewed-by: Nicole Cordes
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/Fixtures/GeneralUtilityFixture.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php