@@ -41,21 +41,21 @@ protected function setUp()
41
41
public function testNone ()
42
42
{
43
43
$ output = $ this ->uut ->apply ('none ' , 'text ' );
44
- $ this ->assertEquals ("text " , $ output );
44
+ $ this ->assertSame ("text " , $ output );
45
45
}
46
46
47
47
public function testBold ()
48
48
{
49
49
$ output = $ this ->uut ->apply ('bold ' , 'text ' );
50
- $ this ->assertEquals ("\033[1mtext \033[0m " , $ output );
50
+ $ this ->assertSame ("\033[1mtext \033[0m " , $ output );
51
51
}
52
52
53
53
public function testBoldColorsAreNotSupported ()
54
54
{
55
55
$ this ->uut ->setIsSupported (false );
56
56
57
57
$ output = $ this ->uut ->apply ('bold ' , 'text ' );
58
- $ this ->assertEquals ("text " , $ output );
58
+ $ this ->assertSame ("text " , $ output );
59
59
}
60
60
61
61
public function testBoldColorsAreNotSupportedButAreForced ()
@@ -64,73 +64,73 @@ public function testBoldColorsAreNotSupportedButAreForced()
64
64
$ this ->uut ->setForceStyle (true );
65
65
66
66
$ output = $ this ->uut ->apply ('bold ' , 'text ' );
67
- $ this ->assertEquals ("\033[1mtext \033[0m " , $ output );
67
+ $ this ->assertSame ("\033[1mtext \033[0m " , $ output );
68
68
}
69
69
70
70
public function testDark ()
71
71
{
72
72
$ output = $ this ->uut ->apply ('dark ' , 'text ' );
73
- $ this ->assertEquals ("\033[2mtext \033[0m " , $ output );
73
+ $ this ->assertSame ("\033[2mtext \033[0m " , $ output );
74
74
}
75
75
76
76
public function testBoldAndDark ()
77
77
{
78
78
$ output = $ this ->uut ->apply (array ('bold ' , 'dark ' ), 'text ' );
79
- $ this ->assertEquals ("\033[1;2mtext \033[0m " , $ output );
79
+ $ this ->assertSame ("\033[1;2mtext \033[0m " , $ output );
80
80
}
81
81
82
82
public function test256ColorForeground ()
83
83
{
84
84
$ output = $ this ->uut ->apply ('color_255 ' , 'text ' );
85
- $ this ->assertEquals ("\033[38;5;255mtext \033[0m " , $ output );
85
+ $ this ->assertSame ("\033[38;5;255mtext \033[0m " , $ output );
86
86
}
87
87
88
88
public function test256ColorWithoutSupport ()
89
89
{
90
90
$ this ->uut ->setAre256ColorsSupported (false );
91
91
92
92
$ output = $ this ->uut ->apply ('color_255 ' , 'text ' );
93
- $ this ->assertEquals ("text " , $ output );
93
+ $ this ->assertSame ("text " , $ output );
94
94
}
95
95
96
96
public function test256ColorBackground ()
97
97
{
98
98
$ output = $ this ->uut ->apply ('bg_color_255 ' , 'text ' );
99
- $ this ->assertEquals ("\033[48;5;255mtext \033[0m " , $ output );
99
+ $ this ->assertSame ("\033[48;5;255mtext \033[0m " , $ output );
100
100
}
101
101
102
102
public function test256ColorForegroundAndBackground ()
103
103
{
104
104
$ output = $ this ->uut ->apply (array ('color_200 ' , 'bg_color_255 ' ), 'text ' );
105
- $ this ->assertEquals ("\033[38;5;200;48;5;255mtext \033[0m " , $ output );
105
+ $ this ->assertSame ("\033[38;5;200;48;5;255mtext \033[0m " , $ output );
106
106
}
107
107
108
108
public function testSetOwnTheme ()
109
109
{
110
110
$ this ->uut ->setThemes (array ('bold_dark ' => array ('bold ' , 'dark ' )));
111
111
$ output = $ this ->uut ->apply (array ('bold_dark ' ), 'text ' );
112
- $ this ->assertEquals ("\033[1;2mtext \033[0m " , $ output );
112
+ $ this ->assertSame ("\033[1;2mtext \033[0m " , $ output );
113
113
}
114
114
115
115
public function testAddOwnTheme ()
116
116
{
117
117
$ this ->uut ->addTheme ('bold_own ' , 'bold ' );
118
118
$ output = $ this ->uut ->apply (array ('bold_own ' ), 'text ' );
119
- $ this ->assertEquals ("\033[1mtext \033[0m " , $ output );
119
+ $ this ->assertSame ("\033[1mtext \033[0m " , $ output );
120
120
}
121
121
122
122
public function testAddOwnThemeArray ()
123
123
{
124
124
$ this ->uut ->addTheme ('bold_dark ' , array ('bold ' , 'dark ' ));
125
125
$ output = $ this ->uut ->apply (array ('bold_dark ' ), 'text ' );
126
- $ this ->assertEquals ("\033[1;2mtext \033[0m " , $ output );
126
+ $ this ->assertSame ("\033[1;2mtext \033[0m " , $ output );
127
127
}
128
128
129
129
public function testOwnWithStyle ()
130
130
{
131
131
$ this ->uut ->addTheme ('bold_dark ' , array ('bold ' , 'dark ' ));
132
132
$ output = $ this ->uut ->apply (array ('bold_dark ' , 'italic ' ), 'text ' );
133
- $ this ->assertEquals ("\033[1;2;3mtext \033[0m " , $ output );
133
+ $ this ->assertSame ("\033[1;2;3mtext \033[0m " , $ output );
134
134
}
135
135
136
136
public function testHasAndRemoveTheme ()
0 commit comments