Skip to content

Commit

Permalink
Add debug flag to flush output
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Dec 15, 2011
1 parent 9d6ea57 commit b339653
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -147,6 +147,9 @@ public function tearDown() {
ClassRegistry::flush();
}
Configure::write($this->_configure);
if (isset($_GET['debug']) && $_GET['debug']) {
ob_flush();
}
}

/**
Expand Down

4 comments on commit b339653

@lorenzo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documented? :p

@markstory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet. I don't really get why people use the webrunner anymore, but that's just me.

@maurozadu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any chance to make the ob_flush() activated by default when running tests from web? I think it would be more consistent with previous versions of Cake. Most people expect to see pr(), echo() and debug() showed on screen and when that doesn’t happens we have to search a lot before to know what’s happening. Thanks!

@markstory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One drawback to outputting directly is you cannot send headers/cookies/sessions which makes it no different than using the command line runner.

Please sign in to comment.