Skip to content

Instantly share code, notes, and snippets.

@motin
Created June 4, 2011 19:02
Show Gist options
  • Save motin/1008206 to your computer and use it in GitHub Desktop.
Save motin/1008206 to your computer and use it in GitHub Desktop.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -648,13 +651,16 @@
$length = strlen($str);
for ( $i=0; $i < $length; $i++ ) {
$char = $str{$i};
if ( $char == '{' ) {
+ if ($nest == 0 && substr($str, $i, 18) != '{&quot;event&quot;') continue;
$nest++;
if ( $nest == 1 ) {
$start_mark = $i;
}
- } elseif ( $char == '}' ) {
+ } elseif ( $char == '}' && $nest > 0) {
if ( $nest == 1 ) {
$tags[] = substr($str, $start_mark + 1, $i - $start_mark - 1);
$start_mark = $i;
@@ -727,11 +733,17 @@
$result = new PHPUnit_Framework_TestResult;
$result->addListener(new PHPUnit_Util_Log_JSON);
+ // We need to temporarily turn off html_errors to ensure correct parsing of test debug output
+ $html_errors = ini_get("html_errors");
ob_start();
+ ini_set("html_errors", 0);
$suite->run($result);
$results = ob_get_contents();
+ ini_set("html_errors", $html_errors);
ob_end_clean();
return $this->_compile_suites($results);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment