Permalink
Browse files

- Disable Xdebug's stacktrace functionality during test execution.

  • Loading branch information...
1 parent 7e38764 commit c90d28623197d35fc6c2f6a0f4659eeaeaabc280 @sebastianbergmann committed Dec 27, 2006
Showing with 12 additions and 1 deletion.
  1. +12 −1 PHPUnit/Framework/TestResult.php
@@ -517,7 +517,14 @@ public function run(PHPUnit_Framework_Test $test)
$globalsBackup = $GLOBALS;
- $useXdebug = (extension_loaded('xdebug') && $this->collectCodeCoverageInformation);
+ $xdebugLoaded = extension_loaded('xdebug');
+ $xdebugEnabled = $xdebugLoaded && xdebug_is_enabled();
+
+ if ($xdebugEnabled) {
+ xdebug_disable();
+ }
+
+ $useXdebug = ($xdebugLoaded && $this->collectCodeCoverageInformation);
if ($useXdebug && !defined('PHPUnit_INSIDE_OWN_TESTSUITE')) {
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
@@ -552,6 +559,10 @@ public function run(PHPUnit_Framework_Test $test)
}
}
+ if ($xdebugEnabled) {
+ xdebug_enable();
+ }
+
$GLOBALS = $globalsBackup;
if ($errorHandlerSet === TRUE) {

0 comments on commit c90d286

Please sign in to comment.