@@ -62,12 +62,12 @@ public function testBlockStyle()
62
62
);
63
63
// @codingStandardsIgnoreStart
64
64
$ expected = PHP_EOL . PHP_EOL . PHP_EOL .
65
- '<testBlockStyle>testBlockPrefix[testBlockType] test first message '
66
- . PHP_EOL . '<testBlockStyle>testBlockPrefix '
67
- . PHP_EOL . '<testBlockStyle>testBlockPrefix test second message '
65
+ '\ <testBlockStyle\ >testBlockPrefix\ [testBlockType\ ] test first message\s+ '
66
+ . PHP_EOL . '\ <testBlockStyle\ >testBlockPrefix\s+ '
67
+ . PHP_EOL . '\ <testBlockStyle\ >testBlockPrefix \s+ test second message\s+ '
68
68
. PHP_EOL . PHP_EOL ;
69
69
// @codingStandardsIgnoreEnd
70
- $ this ->assertEquals ( $ expected , $ this ->testOutput ->output , 'Block does not match output ' );
70
+ $ this ->assertRegExp ( ' / ' . $ expected . ' / ' , $ this ->testOutput ->output , 'Block does not match output ' );
71
71
}
72
72
73
73
/**
@@ -79,7 +79,6 @@ public function testTitleStyle()
79
79
{
80
80
$ this ->magentoStyle ->title ('My Title ' );
81
81
$ expected = PHP_EOL . PHP_EOL . PHP_EOL . ' My Title ' . PHP_EOL . ' ======== ' . PHP_EOL . PHP_EOL ;
82
-
83
82
$ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Title does not match output ' );
84
83
}
85
84
@@ -92,7 +91,6 @@ public function testSectionStyle()
92
91
{
93
92
$ this ->magentoStyle ->section ('My Section ' );
94
93
$ expected = PHP_EOL . PHP_EOL . PHP_EOL . ' My Section ' . PHP_EOL . ' ---------- ' . PHP_EOL . PHP_EOL ;
95
-
96
94
$ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Section does not match output ' );
97
95
}
98
96
@@ -105,7 +103,6 @@ public function testListingStyle()
105
103
{
106
104
$ this ->magentoStyle ->listing (['test first element ' , 'test second element ' ]);
107
105
$ expected = PHP_EOL . ' * test first element ' . PHP_EOL . ' * test second element ' . PHP_EOL . PHP_EOL ;
108
-
109
106
$ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Listing does not match output ' );
110
107
}
111
108
@@ -130,13 +127,8 @@ public function testTextStyle()
130
127
public function testCommentStyle ()
131
128
{
132
129
$ this ->magentoStyle ->comment ('test comment ' );
133
- // @codingStandardsIgnoreStart
134
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
135
- ' test comment '
136
- . PHP_EOL . PHP_EOL ;
137
- // @codingStandardsIgnoreEnd
138
-
139
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Comment does not match output ' );
130
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+test comment\s+ ' . PHP_EOL . PHP_EOL ;
131
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Comment does not match output ' );
140
132
}
141
133
142
134
/**
@@ -147,13 +139,8 @@ public function testCommentStyle()
147
139
public function testSuccessStyle ()
148
140
{
149
141
$ this ->magentoStyle ->success ('test success message ' );
150
- // @codingStandardsIgnoreStart
151
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
152
- ' [SUCCESS] test success message '
153
- . PHP_EOL . PHP_EOL ;
154
- // @codingStandardsIgnoreEnd
155
-
156
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Success message does not match output ' );
142
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . ' \[SUCCESS\] test success message\s+ ' . PHP_EOL . PHP_EOL ;
143
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Success message does not match output ' );
157
144
}
158
145
159
146
/**
@@ -164,13 +151,8 @@ public function testSuccessStyle()
164
151
public function testErrorStyle ()
165
152
{
166
153
$ this ->magentoStyle ->error ('test error message ' );
167
- // @codingStandardsIgnoreStart
168
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
169
- ' [ERROR] test error message '
170
- . PHP_EOL . PHP_EOL ;
171
- // @codingStandardsIgnoreEnd
172
-
173
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Error message does not match output ' );
154
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[ERROR\] test error message\s+ ' . PHP_EOL . PHP_EOL ;
155
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Error message does not match output ' );
174
156
}
175
157
176
158
/**
@@ -181,13 +163,8 @@ public function testErrorStyle()
181
163
public function testWarningStyle ()
182
164
{
183
165
$ this ->magentoStyle ->warning ('test warning message ' );
184
- // @codingStandardsIgnoreStart
185
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
186
- ' [WARNING] test warning message '
187
- . PHP_EOL . PHP_EOL ;
188
- // @codingStandardsIgnoreEnd
189
-
190
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Warning message does not match output ' );
166
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[WARNING\] test warning message\s+ ' . PHP_EOL . PHP_EOL ;
167
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Warning message does not match output ' );
191
168
}
192
169
193
170
/**
@@ -198,13 +175,8 @@ public function testWarningStyle()
198
175
public function testNoteStyle ()
199
176
{
200
177
$ this ->magentoStyle ->note ('test note message ' );
201
- // @codingStandardsIgnoreStart
202
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
203
- ' [NOTE] test note message '
204
- . PHP_EOL . PHP_EOL ;
205
- // @codingStandardsIgnoreEnd
206
-
207
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Note message does not match output ' );
178
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[NOTE\] test note message\s+ ' . PHP_EOL . PHP_EOL ;
179
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Note message does not match output ' );
208
180
}
209
181
210
182
/**
@@ -215,13 +187,8 @@ public function testNoteStyle()
215
187
public function testCautionStyle ()
216
188
{
217
189
$ this ->magentoStyle ->caution ('test caution message ' );
218
- // @codingStandardsIgnoreStart
219
- $ expected = PHP_EOL . PHP_EOL . PHP_EOL .
220
- ' ! [CAUTION] test caution message '
221
- . PHP_EOL . PHP_EOL ;
222
- // @codingStandardsIgnoreEnd
223
-
224
- $ this ->assertEquals ($ expected , $ this ->testOutput ->output , 'Caution message does not match output ' );
190
+ $ expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+! \[CAUTION\] test caution message\s+ ' . PHP_EOL . PHP_EOL ;
191
+ $ this ->assertRegExp ('/ ' . $ expected . '/ ' , $ this ->testOutput ->output , 'Caution message does not match output ' );
225
192
}
226
193
227
194
/**
0 commit comments