Lucas Werkmeister (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406035 )
Change subject: Don’t write to stderr when testing ...................................................................... Don’t write to stderr when testing This change makes it possible to test error() messages with expectOutputString() or expectOutputRegex(). Change-Id: I61970403f9c371d3798f34fd48c70bc72f0c7eda --- M maintenance/Maintenance.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/406035/1 diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 5adbee5..69284ac 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -414,7 +414,10 @@ $this->fatalError( $err, intval( $die ) ); } $this->outputChanneled( false ); - if ( PHP_SAPI == 'cli' || PHP_SAPI == 'phpdbg' ) { + if ( + ( PHP_SAPI == 'cli' || PHP_SAPI == 'phpdbg' ) && + !defined( 'MW_PHPUNIT_TEST' ) + ) { fwrite( STDERR, $err . "\n" ); } else { print $err; -- To view, visit https://gerrit.wikimedia.org/r/406035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61970403f9c371d3798f34fd48c70bc72f0c7eda Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits