From c3b70dccb35a499fc53760a71673ab0fa834bf15 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 20 Oct 2010 23:40:05 -0400 Subject: [PATCH] Fixing issue where a missing style would consume a tag on the xml output. --- cake/console/libs/console_output.php | 2 +- cake/tests/cases/console/libs/console_output.test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/console/libs/console_output.php b/cake/console/libs/console_output.php index 9dd9cbaa6c1..0ac5cefc360 100644 --- a/cake/console/libs/console_output.php +++ b/cake/console/libs/console_output.php @@ -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'] . ''; } $styleInfo = array(); diff --git a/cake/tests/cases/console/libs/console_output.test.php b/cake/tests/cases/console/libs/console_output.test.php index a0192e7b465..c67ded9e89c 100644 --- a/cake/tests/cases/console/libs/console_output.test.php +++ b/cake/tests/cases/console/libs/console_output.test.php @@ -171,7 +171,7 @@ function testFormattingCustom() { */ function testFormattingMissingStyleName() { $this->output->expects($this->once())->method('_write') - ->with("Error: Something bad"); + ->with("Error: Something bad"); $this->output->write('Error: Something bad', false); }