From d53b8fd8b8a9fa1a2088746953e753d11169663d Mon Sep 17 00:00:00 2001 From: Claudio Zizza Date: Sat, 29 Nov 2014 20:56:22 +0100 Subject: [PATCH] new test added for unknown color names --- tests/MageTest/Console/ColorsTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/MageTest/Console/ColorsTest.php b/tests/MageTest/Console/ColorsTest.php index 4e1304a..2655409 100644 --- a/tests/MageTest/Console/ColorsTest.php +++ b/tests/MageTest/Console/ColorsTest.php @@ -47,4 +47,22 @@ class ColorsTest extends PHPUnit_Framework_TestCase $this->assertSame($expected, $result); } + + /** + * @group 159 + */ + public function testColorUnknownColorName() + { + $config = $this->getMock('Mage\Config'); + $config->expects($this->once()) + ->method('getParameter') + ->will($this->returnValue(false)); + + $string = 'FooBar'; + + // Method need to be non static in the future + $result = Colors::color($string, $config); + + $this->assertSame($string, $result); + } }