From 42457c96e481e67a624c762875fcb2c0e56b19a3 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 24 Jan 2012 09:21:04 -0500 Subject: [PATCH] Do not show message that Xdebug is not loaded multipe times when multiple code coverage report formats are requested. --- PHPUnit/TextUI/Command.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PHPUnit/TextUI/Command.php b/PHPUnit/TextUI/Command.php index 8a2702ed61e..cdddaada22e 100644 --- a/PHPUnit/TextUI/Command.php +++ b/PHPUnit/TextUI/Command.php @@ -116,6 +116,11 @@ class PHPUnit_TextUI_Command 'version' => NULL ); + /** + * @var array + */ + protected $missingExtensions = array(); + /** * @param boolean $exit */ @@ -873,6 +878,10 @@ protected function handleBootstrap($filename) */ protected function showExtensionNotLoadedMessage($extension, $message = '') { + if (isset($this->missingExtensions[$extension])) { + return; + } + if (!empty($message)) { $message = ' ' . $message; } @@ -881,6 +890,8 @@ protected function showExtensionNotLoadedMessage($extension, $message = '') 'The ' . $extension . ' extension is not loaded.' . $message . "\n", FALSE ); + + $this->missingExtensions[$extension] = TRUE; } /**