Moving buffer start in CakeHtmlReporter to fix errors when displaying menus.

Adding paintDocumentStart() to CakeTextReporter::paintHeader() to fix issues with test results not being text/plain.
This commit is contained in:
Mark Story 2010-01-10 13:05:35 -05:00
parent a41678e51f
commit 3dad64c9c0
2 changed files with 2 additions and 1 deletions

View file

@ -38,7 +38,6 @@ class CakeHtmlReporter extends CakeBaseReporter {
*/
function paintHeader($testName) {
$this->sendNoCacheHeaders();
ob_start();
$this->paintDocumentStart();
$this->paintTestMenu();
echo "<h2>$testName</h2>\n";
@ -51,6 +50,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
* @return void
*/
function paintDocumentStart() {
ob_start();
$baseDir = $this->params['baseDir'];
include CAKE_TESTS_LIB . 'templates' . DS . 'header.php';
}

View file

@ -72,6 +72,7 @@ class CakeTextReporter extends CakeBaseReporter {
* @access public
*/
function paintHeader($test_name) {
$this->paintDocumentStart();
echo "$test_name\n";
flush();
}