diff --git a/cake/console/console_output.php b/cake/console/console_output.php index 59dad2da9..2746c8285 100644 --- a/cake/console/console_output.php +++ b/cake/console/console_output.php @@ -24,9 +24,10 @@ * Can generate colourzied output on consoles that support it. There are a few * built in styles * - * - `error` Error messages. Bright red text. - * - `warning` Warning messages. Bright orange text - * - `info` Informational messages. Cyan text. + * - `error` Error messages. + * - `warning` Warning messages. + * - `info` Informational messages. + * - `comment` Additional text. * * By defining styles with addStyle() you can create custom console styles. * @@ -113,10 +114,11 @@ class ConsoleOutput { * @var array */ protected static $_styles = array( - 'error' => array('text' => 'red'), + 'error' => array('text' => 'red', 'underline' => true), 'warning' => array('text' => 'yellow'), 'info' => array('text' => 'cyan'), - 'success' => array('text' => 'green') + 'success' => array('text' => 'green'), + 'comment' => array('text' => 'blue') ); /** diff --git a/cake/tests/cases/console/console_output.test.php b/cake/tests/cases/console/console_output.test.php index 00cf0822e..166830f2b 100644 --- a/cake/tests/cases/console/console_output.test.php +++ b/cake/tests/cases/console/console_output.test.php @@ -96,7 +96,7 @@ class ConsoleOutputTest extends CakeTestCase { */ function testStylesGet() { $result = $this->output->styles('error'); - $expected = array('text' => 'red'); + $expected = array('text' => 'red', 'underline' => true); $this->assertEqual($result, $expected); $this->assertNull($this->output->styles('made_up_goop')); @@ -128,7 +128,7 @@ class ConsoleOutputTest extends CakeTestCase { */ function testFormattingSimple() { $this->output->expects($this->once())->method('_write') - ->with("\033[31mError:\033[0m Something bad"); + ->with("\033[31;4mError:\033[0m Something bad"); $this->output->write('Error: Something bad', false); } @@ -171,7 +171,7 @@ class ConsoleOutputTest extends CakeTestCase { */ function testFormattingMultipleStylesName() { $this->output->expects($this->once())->method('_write') - ->with("\033[31mBad\033[0m \033[33mWarning\033[0m Regular"); + ->with("\033[31;4mBad\033[0m \033[33mWarning\033[0m Regular"); $this->output->write('Bad Warning Regular', false); }