MDL-46548 behat: Prevent force file save as for some pages we want to test with behat.

This commit is contained in:
Damyon Wiese
2014-08-04 16:18:32 +08:00
parent 6c6d05a651
commit ad5ab383e6
2 changed files with 12 additions and 2 deletions
+5
View File
@@ -471,6 +471,11 @@ class csv_export_writer {
*/
protected function send_header() {
global $CFG;
if (defined('BEHAT_SITE_RUNNING')) {
// For text based formats - we cannot test the output with behat if we force a file download.
return;
}
if (strpos($CFG->wwwroot, 'https://') === 0) { //https sites - watch out for IE! KB812935 and KB316431
header('Cache-Control: max-age=10');
header('Pragma: ');