File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace PHP_Parallel_Lint \PhpConsoleHighlighter \Test ;
4
+
5
+ use PHP_Parallel_Lint \PhpConsoleColor \ConsoleColor ;
6
+ use PHP_Parallel_Lint \PhpConsoleHighlighter \Highlighter ;
7
+
8
+ /**
9
+ * @covers PHP_Parallel_Lint\PhpConsoleHighlighter\Highlighter::__construct
10
+ */
11
+ class ConstructorTest extends HighlighterTestCase
12
+ {
13
+ /**
14
+ * Test constructor, including integration with ConsoleColor.
15
+ */
16
+ public function testConstructor ()
17
+ {
18
+ $ color = new ConsoleColor ();
19
+ // Ensure that at least one style is already set so all branches get tested.
20
+ $ color ->addTheme (Highlighter::TOKEN_DEFAULT , 'bg_light_red ' );
21
+
22
+ $ highlighter = new Highlighter ($ color );
23
+ $ themes = $ color ->getThemes ();
24
+
25
+ $ this ->assertNotEmpty ($ themes );
26
+ $ this ->assertCount (7 , $ themes );
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments