* @since Class available since 0.7 */ class PassInfoFromRewriteToScriptThroughRequestHeaderTester extends CustomTester { /** * Constructor. * * @return void */ public function __construct() { $htaccessFile = <<<'EOD' RewriteEngine On # We pass document root, because that can easily be checked by the script RewriteRule ^test\.php$ - [E=PASSTHROUGHHEADER:%{DOCUMENT_ROOT},L] RequestHeader set PASSTHROUGHHEADER "%{PASSTHROUGHHEADER}e" env=PASSTHROUGHHEADER EOD; $phpFile = <<<'EOD' 'pass-info-from-rewrite-to-script-through-request-header', 'files' => [ ['.htaccess', $htaccessFile], ['test.php', $phpFile], ], 'request' => 'test.php', 'interpretation' => [ ['success', 'body', 'equals', '1'], ['failure', 'body', 'equals', '0'], ['inconclusive', 'body', 'begins-with', '<' . '?php'], ['inconclusive'] ] ]; parent::__construct($test); } }