@@ -184,27 +184,33 @@ public function testCliArgsWithPaths($name, $expected)
184
184
*/
185
185
public static function dataCliArgsWithPaths ()
186
186
{
187
- return [
188
- 'Paths should be resolved based on the ruleset location: basepath ' => [
187
+ $ data = [
188
+ 'Paths should be resolved based on the ruleset location: basepath ' => [
189
189
'name ' => 'basepath ' ,
190
190
'expected ' => self ::FIXTURE_DIR ,
191
191
],
192
- 'Paths should be resolved based on the ruleset location: reportFile ' => [
193
- 'name ' => 'reportFile ' ,
194
- 'expected ' => self ::FIXTURE_DIR .'/config/phpcs/report.txt ' ,
195
- ],
196
- 'Paths should be resolved based on the ruleset location: bootstrap ' => [
192
+ 'Paths should be resolved based on the ruleset location: bootstrap ' => [
197
193
'name ' => 'bootstrap ' ,
198
194
'expected ' => [
199
195
self ::FIXTURE_DIR .'/vendor/OrgName/ExtStandard/bootstrap.php ' ,
200
196
],
201
197
],
202
- 'Paths should be resolved based on the ruleset location: cacheFile ' => [
198
+ 'Paths should be resolved based on the ruleset location: cacheFile ' => [
203
199
'name ' => 'cacheFile ' ,
204
200
'expected ' => self ::FIXTURE_DIR .'/config/phpcs/.cache.phpcs ' ,
205
201
],
206
202
];
207
203
204
+ // Setting the `--report-file=` arg is only supported when running `phpcs`.
205
+ if (PHP_CODESNIFFER_CBF === false ) {
206
+ $ data ['Paths should be resolved based on the ruleset location: reportFile ' ] = [
207
+ 'name ' => 'reportFile ' ,
208
+ 'expected ' => self ::FIXTURE_DIR .'/config/phpcs/report.txt ' ,
209
+ ];
210
+ }
211
+
212
+ return $ data ;
213
+
208
214
}//end dataCliArgsWithPaths()
209
215
210
216
0 commit comments