tests top-level property
Implementation
final FigGenerator tests = FigGenerator(
script: ['phpunit', '--list-tests'],
postProcess: (String out, [List<String>? tokens]) {
if (out.startsWith('fatal:')) {
return [];
}
return out
.split('\n')
.where((line) => line.indexOf('::') > 0)
.map((line) {
final name = line.substring(line.indexOf('::') + 2);
return FigSuggestion(
name: name,
icon: 'fig://icon?type=php',
description: name,
);
}).toList();
},
);