|
@@ 80-86 (lines=7) @@
|
| 77 |
|
assertSame((string) color('Hello')->blue(), (string) color('Hello')->blue); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
public function testShouldSupportUserStyles() |
| 81 |
|
{ |
| 82 |
|
$color = new Color(); |
| 83 |
|
$color->setUserStyles(array('error' => 'red')); |
| 84 |
|
|
| 85 |
|
assertEquals((string) color('Error...')->red(), (string) $color('Error...')->error()); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
public function testUserStylesShouldOverrideDefaultStyles() |
| 89 |
|
{ |
|
@@ 88-94 (lines=7) @@
|
| 85 |
|
assertEquals((string) color('Error...')->red(), (string) $color('Error...')->error()); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
public function testUserStylesShouldOverrideDefaultStyles() |
| 89 |
|
{ |
| 90 |
|
$color = new Color(); |
| 91 |
|
$color->setUserStyles(array('white' => 'red')); |
| 92 |
|
|
| 93 |
|
assertEquals((string) color('Warning...')->red, (string) $color('Warning...')->white); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
public function testGivenInvalidUserStyleNameShouldThrowAnException() |
| 97 |
|
{ |