Skip to content

Commit 69d6b1e

Browse files
committed
ConsoleColor::addTheme(): add test for exception
1 parent 4b32244 commit 69d6b1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/ConsoleColorTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ public function testAddOwnThemeArray()
106106
$this->assertSame("\033[1;2mtext\033[0m", $output);
107107
}
108108

109+
/**
110+
* @covers ::addTheme
111+
*/
112+
public function testAddOwnThemeInvalidInput()
113+
{
114+
$this->exceptionHelper('\InvalidArgumentException', 'Style must be string or array.');
115+
116+
$this->uut->addTheme('invalid', new \ArrayIterator(array('bold', 'dark')));
117+
}
118+
109119
public function testOwnWithStyle()
110120
{
111121
$this->uut->addTheme('bold_dark', array('bold', 'dark'));

0 commit comments

Comments
 (0)