File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -62,20 +62,24 @@ private function prepareResource($argument): string
6262 private function prepareArray (array $ argument ): array
6363 {
6464 return array_map (
65- fn (mixed $ element ): mixed => $ this ->prepareArgument ($ element ),
65+ fn (mixed $ element ): mixed => $ this ->prepareArgument ($ element ),
6666 $ argument ,
6767 );
6868 }
6969
70+ private function isClosure (object $ argument ): bool
71+ {
72+ return $ argument instanceof \Closure;
73+ }
74+
7075 private function prepareObject (object $ argument ): string
7176 {
72- if (isset ($ argument ->__mocked ) && is_object ($ argument ->__mocked )) {
77+ if (! $ this -> isClosure ( $ argument ) && isset ($ argument ->__mocked ) && is_object ($ argument ->__mocked )) {
7378 $ argument = $ argument ->__mocked ;
7479 }
7580 if ($ argument instanceof Stringable) {
7681 return (string ) $ argument ;
7782 }
78-
7983 $ webdriverByClass = '\Facebook\WebDriver\WebDriverBy ' ;
8084 if (class_exists ($ webdriverByClass ) && is_a ($ argument , $ webdriverByClass )) {
8185 return $ this ->webDriverByAsString ($ argument );
You can’t perform that action at this time.
0 commit comments