Skip to content

Commit 7048ed4

Browse files
committed
DisplayCachedMessagesTest: allow for the tests to pass in CBF mode
1 parent bcab9e5 commit 7048ed4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/Core/Ruleset/DisplayCachedMessagesTest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,24 @@ public function testNonBlockingErrorsDoNotShowUnderSpecificCircumstances($config
229229
*/
230230
public static function dataSelectiveDisplayOfMessages()
231231
{
232-
return [
233-
'Explain mode' => [
232+
$data = [
233+
'Explain mode' => [
234234
'configArgs' => ['-e'],
235235
],
236-
'Quiet mode' => [
236+
'Quiet mode' => [
237237
'configArgs' => ['-q'],
238238
],
239-
'Documentation is requested' => [
240-
'configArgs' => ['--generator=text'],
241-
],
242239
];
243240

241+
// Setting the `--generator` arg is only supported when running `phpcs`.
242+
if (PHP_CODESNIFFER_CBF === false) {
243+
$data['Documentation is requested'] = [
244+
'configArgs' => ['--generator=text'],
245+
];
246+
}
247+
248+
return $data;
249+
244250
}//end dataSelectiveDisplayOfMessages()
245251

246252

0 commit comments

Comments
 (0)