/** * @param string $httpResponse * @param string $expected * @test * @dataProvider getStripHttpHeadersDataProvider */ public function stripHttpHeadersStripsHeadersFromHttpResponse($httpResponse, $expected) { $this->assertEquals($expected, GeneralUtilityFixture::stripHttpHeaders($httpResponse)); }
/** * @param string $httpHost HTTP_HOST string * @param string $hostNamePattern trusted hosts pattern * @test * @dataProvider hostnamesNotMatchingTrustedHostsConfigurationDataProvider * @expectedException \UnexpectedValueException * @expectedExceptionCode 1396795884 */ public function getIndpEnvForHostThrowsExceptionForNotAllowedHostnameValues($httpHost, $hostNamePattern) { $_SERVER['HTTP_HOST'] = $httpHost; $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = $hostNamePattern; GeneralUtilityFixture::getIndpEnv('HTTP_HOST'); }