Skip to content

Commit 28698bd

Browse files
committed
MC-39899: Stabilize MFTF tests
- Fix static tests
1 parent 6f50c18 commit 28698bd

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

setup/src/Magento/Setup/Test/Unit/Console/Style/MagentoStyleTest.php

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ public function testBlockStyle()
6868
. PHP_EOL . PHP_EOL;
6969
// @codingStandardsIgnoreEnd
7070
$this->assertMatchesRegularExpression(
71-
'/' . $expected . '/', $this->testOutput->output, 'Block does not match output');
71+
'/' . $expected . '/',
72+
$this->testOutput->output,
73+
'Block does not match output'
74+
);
7275
}
7376

7477
/**
@@ -130,7 +133,10 @@ public function testCommentStyle()
130133
$this->magentoStyle->comment('test comment');
131134
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+test comment\s+' . PHP_EOL . PHP_EOL;
132135
$this->assertMatchesRegularExpression(
133-
'/' . $expected . '/', $this->testOutput->output, 'Comment does not match output');
136+
'/' . $expected . '/',
137+
$this->testOutput->output,
138+
'Comment does not match output'
139+
);
134140
}
135141

136142
/**
@@ -143,7 +149,10 @@ public function testSuccessStyle()
143149
$this->magentoStyle->success('test success message');
144150
$expected = PHP_EOL . PHP_EOL . PHP_EOL . ' \[SUCCESS\] test success message\s+' . PHP_EOL . PHP_EOL;
145151
$this->assertMatchesRegularExpression(
146-
'/' . $expected . '/', $this->testOutput->output, 'Success message does not match output');
152+
'/' . $expected . '/',
153+
$this->testOutput->output,
154+
'Success message does not match output'
155+
);
147156
}
148157

149158
/**
@@ -156,7 +165,10 @@ public function testErrorStyle()
156165
$this->magentoStyle->error('test error message');
157166
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[ERROR\] test error message\s+' . PHP_EOL . PHP_EOL;
158167
$this->assertMatchesRegularExpression(
159-
'/' . $expected . '/', $this->testOutput->output, 'Error message does not match output');
168+
'/' . $expected . '/',
169+
$this->testOutput->output,
170+
'Error message does not match output'
171+
);
160172
}
161173

162174
/**
@@ -169,7 +181,10 @@ public function testWarningStyle()
169181
$this->magentoStyle->warning('test warning message');
170182
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[WARNING\] test warning message\s+' . PHP_EOL . PHP_EOL;
171183
$this->assertMatchesRegularExpression(
172-
'/' . $expected . '/', $this->testOutput->output, 'Warning message does not match output');
184+
'/' . $expected . '/',
185+
$this->testOutput->output,
186+
'Warning message does not match output'
187+
);
173188
}
174189

175190
/**
@@ -182,7 +197,10 @@ public function testNoteStyle()
182197
$this->magentoStyle->note('test note message');
183198
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[NOTE\] test note message\s+' . PHP_EOL . PHP_EOL;
184199
$this->assertMatchesRegularExpression(
185-
'/' . $expected . '/', $this->testOutput->output, 'Note message does not match output');
200+
'/' . $expected . '/',
201+
$this->testOutput->output,
202+
'Note message does not match output'
203+
);
186204
}
187205

188206
/**
@@ -195,7 +213,10 @@ public function testCautionStyle()
195213
$this->magentoStyle->caution('test caution message');
196214
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+! \[CAUTION\] test caution message\s+' . PHP_EOL . PHP_EOL;
197215
$this->assertMatchesRegularExpression(
198-
'/' . $expected . '/', $this->testOutput->output, 'Caution message does not match output');
216+
'/' . $expected . '/',
217+
$this->testOutput->output,
218+
'Caution message does not match output'
219+
);
199220
}
200221

201222
/**

0 commit comments

Comments
 (0)