Skip to content

Commit

Permalink
Fixing missing headers when in plain text reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 10, 2010
1 parent e061a53 commit 88f58df
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cake/tests/lib/reporter/cake_text_reporter.php
Expand Up @@ -27,6 +27,17 @@
*/
class CakeTextReporter extends CakeBaseReporter {

/**
* Sets the text/plain header if the test is not a CLI test.
*
* @return void
*/
function paintDocumentStart() {
if (!SimpleReporter::inCli()) {
header('Content-type: text/plain');
}
}

/**
* Paints the end of the test with a summary of
* the passes and failures.
Expand All @@ -52,6 +63,7 @@ function paintFooter($test_name) {
echo 'Peak memory use: (in bytes): ' . number_format(memory_get_peak_usage()) . "\n";
}
}

/**
* Paints the title only.
*
Expand All @@ -60,7 +72,6 @@ function paintFooter($test_name) {
* @access public
*/
function paintHeader($test_name) {
header('Content-type: text/plain');
echo "$test_name\n";
flush();
}
Expand Down

0 comments on commit 88f58df

Please sign in to comment.