Skip to content

Commit

Permalink
Fixing issue where a missing style would consume a tag on the xml out…
Browse files Browse the repository at this point in the history
…put.
  • Loading branch information
markstory committed Oct 21, 2010
1 parent 1d5f730 commit c3b70dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/console/libs/console_output.php
Expand Up @@ -176,7 +176,7 @@ public function styleText($text) {
protected function _replaceTags($matches) {
$style = $this->styles($matches['tag']);
if (empty($style)) {
return $matches['text'];
return '<' . $matches['tag'] . '>' . $matches['text'] . '</' . $matches['tag'] . '>';
}

$styleInfo = array();
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/console/libs/console_output.test.php
Expand Up @@ -171,7 +171,7 @@ function testFormattingCustom() {
*/
function testFormattingMissingStyleName() {
$this->output->expects($this->once())->method('_write')
->with("Error: Something bad");
->with("<not_there>Error:</not_there> Something bad");

$this->output->write('<not_there>Error:</not_there> Something bad', false);
}
Expand Down

0 comments on commit c3b70dc

Please sign in to comment.