@@ 16-22 (lines=7) @@ | ||
13 | */ |
|
14 | class ColorsAdapterTest extends PHPUnit_Framework_TestCase |
|
15 | { |
|
16 | public function testColorAdapter() |
|
17 | { |
|
18 | $color = new Color; |
|
19 | $color->setForceStyle(true); |
|
20 | $adapter = new ColorsAdapter($color); |
|
21 | $this->assertSame('[32mHELLO WORLD[0m', $adapter->colour('HELLO WORLD', 'green')); |
|
22 | } |
|
23 | ||
24 | public function testStringIsReturnedAsIsIfNoStyleExists() |
|
25 | { |
|
@@ 24-30 (lines=7) @@ | ||
21 | $this->assertSame('[32mHELLO WORLD[0m', $adapter->colour('HELLO WORLD', 'green')); |
|
22 | } |
|
23 | ||
24 | public function testStringIsReturnedAsIsIfNoStyleExists() |
|
25 | { |
|
26 | $color = new Color; |
|
27 | $color->setForceStyle(true); |
|
28 | $adapter = new ColorsAdapter($color); |
|
29 | $this->assertSame('HELLO WORLD', $adapter->colour('HELLO WORLD', 'not-a-style')); |
|
30 | } |
|
31 | } |
|
32 |