Ticket #319: phing_undefined_variable_error.patch
| File phing_undefined_variable_error.patch, 4.2 KB (added by tarjei@…, 3 years ago) |
|---|
-
SimpleTestPlainResultFormatter.php
54 54 { 55 55 parent::paintCaseEnd($test_name); 56 56 57 $sb = ""; 57 58 /* Only count suites where more than one test was run */ 58 59 if ($this->getRunCount()) 59 60 { -
SimpleTestDebugResultFormatter.php
45 45 { 46 46 parent::paintCaseStart($test_name); 47 47 $this->paint( "Testsuite: $test_name\n"); 48 $this->current_case = $test_name;48 $this->current_case = $test_name; 49 49 } 50 function paintMethodStart($test_name) 50 51 function paintMethodStart($test_name) 51 52 { 52 parent::paintMethodStart($test_name);53 $this->current_test = $test_name;54 //$msg = "{$this->current_case} :: $test_name\n";55 $msg = " TestCase: $test_name";56 $this->paint($msg);57 }53 parent::paintMethodStart($test_name); 54 $this->current_test = $test_name; 55 //$msg = "{$this->current_case} :: $test_name\n"; 56 $msg = " TestCase: $test_name"; 57 $this->paint($msg); 58 } 58 59 59 function paint($msg) { 60 if ($this->out == null ) { 61 print $msg; 62 } else { 63 $this->out->write($msg); 64 } 65 66 60 function paint($msg) { 61 if ($this->out == null ) { 62 print $msg; 63 } else { 64 $this->out->write($msg); 67 65 } 66 } 68 67 69 function paintMethodEnd($test_name) { 70 parent::paintMethodEnd($test_name); 71 $this->paint("\n"); 68 function paintMethodEnd($test_name) { 69 parent::paintMethodEnd($test_name); 70 $this->paint("\n"); 71 } 72 72 73 } 74 75 function paintCaseEnd($test_name) 76 { 77 parent::paintCaseEnd($test_name); 78 $this->current_case = ""; 79 /* Only count suites where more than one test was run */ 80 if ($this->getRunCount() && false) 81 { 82 $sb.= "Tests run: " . $this->getRunCount(); 83 $sb.= ", Failures: " . $this->getFailureCount(); 84 $sb.= ", Errors: " . $this->getErrorCount(); 85 $sb.= ", Time elapsed: " . $this->getElapsedTime(); 86 $sb.= " sec\n"; 87 $this->paint($sb); 88 } 73 function paintCaseEnd($test_name) 74 { 75 parent::paintCaseEnd($test_name); 76 $this->current_case = ""; 77 /* Only count suites where more than one test was run */ 89 78 79 if ($this->getRunCount() && false) 80 { 81 $sb = ""; 82 $sb.= "Tests run: " . $this->getRunCount(); 83 $sb.= ", Failures: " . $this->getFailureCount(); 84 $sb.= ", Errors: " . $this->getErrorCount(); 85 $sb.= ", Time elapsed: " . $this->getElapsedTime(); 86 $sb.= " sec\n"; 87 $this->paint($sb); 90 88 } 91 89 92 function paintError($message) 93 { 94 parent::paintError($message); 95 $this->formatError("ERROR", $message); 96 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 97 } 90 } 98 91 99 function paintFail($message) 100 { 101 parent::paintFail($message); 102 $this->formatError("FAILED", $message); 103 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 104 } 105 function paintException($message) 106 { 107 parent::paintException($message); 108 109 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 110 $this->formatError("Exception", $message); 111 } 92 function paintError($message) 93 { 94 parent::paintError($message); 95 $this->formatError("ERROR", $message); 96 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 97 } 112 98 99 function paintFail($message) 100 { 101 parent::paintFail($message); 102 $this->formatError("FAILED", $message); 103 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 104 } 105 function paintException($message) 106 { 107 parent::paintException($message); 108 $this->failingTests[] = $this->current_case . "->" . $this->current_test; 109 $this->formatError("Exception", $message); 110 } 113 111 114 112 115 private function formatError($type, $message)116 {117 113 118 $this->paint("ERROR: $type: $message"); 119 } 114 private function formatError($type, $message) 115 { 116 $this->paint("ERROR: $type: $message"); 117 } 120 118 121 119 } 122 120 ?>
