mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
MDL-33359 - mtrace: dont output to STDOUT in unit tests
This allows us to use phpunit output buffering functions
This commit is contained in:
parent
4631e39533
commit
4ad85bd857
@ -9642,7 +9642,7 @@ function address_in_subnet($addr, $subnetstr) {
|
||||
*/
|
||||
function mtrace($string, $eol="\n", $sleep=0) {
|
||||
|
||||
if (defined('STDOUT')) {
|
||||
if (defined('STDOUT') and !PHPUNIT_TEST) {
|
||||
fwrite(STDOUT, $string.$eol);
|
||||
} else {
|
||||
echo $string . $eol;
|
||||
|
Loading…
x
Reference in New Issue
Block a user