Skip to content
This repository
Browse code

MINOR Ensure incomplete tests also have a backtrace

  • Loading branch information...
commit f57a763524c5304889596a2071a6bc027af29415 1 parent ce097a7
Sean Harvey authored April 15, 2012

Showing 1 changed file with 3 additions and 6 deletions. Show diff stats Hide diff stats

  1. 9  dev/CliTestReporter.php
9  dev/CliTestReporter.php
@@ -98,12 +98,9 @@ protected function writeTest($test) {
98 98
 				
99 99
 			}
100 100
 
101  
-			if( $test['status'] == 2) {
102  
-				echo "\n" . SS_Cli::text($test['name'] . "\n" . $test['message'] . "\n", 'yellow', null);
103  
-			} else {
104  
-				echo "\n" . SS_Cli::text($test['name'] . "\n". $test['message'] . "\n", 'red', null);
105  
-				echo SS_Backtrace::get_rendered_backtrace($filteredTrace, true);
106  
-			}
  101
+			$color = ($test['status'] == 2) ? 'yellow' : 'red';
  102
+			echo "\n" . SS_Cli::text($test['name'] . "\n". $test['message'] . "\n", $color, null);
  103
+			echo SS_Backtrace::get_rendered_backtrace($filteredTrace, true);
107 104
 			echo "--------------------\n";
108 105
 		}
109 106
 	}

0 notes on commit f57a763

Please sign in to comment.
Something went wrong with that request. Please try again.