File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -845,10 +845,28 @@ final public function dataSetAsString(): string
845845 {
846846 if ($ this ->data !== []) {
847847 if (is_int ($ this ->dataName )) {
848- return sprintf (' with data set #%d ' , $ this ->dataName );
848+ return sprintf (' with data set %s ' , $ this ->dataSetAsFilterString () );
849849 }
850850
851- return sprintf (' with data set "%s" ' , $ this ->dataName );
851+ return sprintf (' with data set "%s" ' , $ this ->dataSetAsFilterString ());
852+ }
853+
854+ return '' ;
855+ }
856+
857+ /**
858+ * Returns the data set as a string compatible with the --filter CLI option.
859+ *
860+ * @internal This method is not covered by the backward compatibility promise for PHPUnit
861+ */
862+ final public function dataSetAsFilterString (): string
863+ {
864+ if ($ this ->data !== []) {
865+ if (is_int ($ this ->dataName )) {
866+ return sprintf ('#%d ' , $ this ->dataName );
867+ }
868+
869+ return sprintf ('%s ' , $ this ->dataName );
852870 }
853871
854872 return '' ;
You can’t perform that action at this time.
0 commit comments