File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1313use function getenv ;
1414use function is_string ;
1515use function mb_strtolower ;
16+ use function method_exists ;
1617use function rtrim ;
1718use function Safe \array_walk_recursive ;
1819use function Safe \json_decode ;
@@ -215,15 +216,25 @@ private function snapshotName(string $postfix): string
215216 $ class = preg_replace ('/(.)([[:upper:]])/u ' , '\1_\2 ' , $ class );
216217 $ class = mb_strtolower ($ class );
217218
218- $ method = $ this ->getName (false );
219+ if (method_exists ($ this , 'name ' )) {
220+ $ method = $ this ->name ();
221+ } else {
222+ $ method = $ this ->getName (false );
223+ }
224+
219225 if (strpos ($ method , 'test ' ) === 0 ) {
220226 $ method = substr ($ method , strlen ('test ' ));
221227 }
222228
223229 $ method = preg_replace ('/(.)([[:upper:]])/u ' , '\1_\2 ' , $ method );
224230 $ method = mb_strtolower ($ method );
225231
226- $ dataset = mb_strtolower ($ this ->getDataSetAsString (false ));
232+ if (method_exists ($ this , 'dataSetAsString ' )) {
233+ $ dataset = mb_strtolower ($ this ->dataSetAsString ());
234+ } else {
235+ $ dataset = mb_strtolower ($ this ->getDataSetAsString (false ));
236+ }
237+
227238 $ matches = [];
228239 preg_match ('/"([^"]+)"/ ' , $ dataset , $ matches );
229240
You can’t perform that action at this time.
0 commit comments