MDL-65919 core: Skip send headers during phpunit exec in dataformats

This commit is contained in:
Alberto Lara Hernández
2019-09-30 12:00:33 +02:00
committed by Marina Glancy
parent 9528b1ff5b
commit 40a6b502ae
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ abstract class base {
* Output file headers to initialise the download of the file.
*/
public function send_http_headers() {
if (defined('BEHAT_SITE_RUNNING')) {
if (defined('BEHAT_SITE_RUNNING') || PHPUNIT_TEST) {
// For text based formats - we cannot test the output with behat if we force a file download.
return;
}