@@ 53-60 (lines=8) @@ | ||
50 | return $this; |
|
51 | }); |
|
52 | ||
53 | TestResponse::macro('visualDiffForResolutions', function (array $resolutions, $name = null) { |
|
54 | if (is_null($name)) { |
|
55 | // Guess the test name from the backtrace |
|
56 | $name = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5)[4]['function']; |
|
57 | } |
|
58 | ||
59 | return $this->visualDiff($name, $resolutions); |
|
60 | }); |
|
61 | ||
62 | if (class_exists(Browser::class)) { |
|
63 | Browser::macro('visualDiff', function ($name = null, $resolutions = null) { |
|
@@ 87-94 (lines=8) @@ | ||
84 | return $this; |
|
85 | }); |
|
86 | ||
87 | Browser::macro('visualDiffForResolutions', function (array $resolutions, $name = null) { |
|
88 | if (is_null($name)) { |
|
89 | // Guess the test name from the backtrace |
|
90 | $name = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 7)[6]['function']; |
|
91 | } |
|
92 | ||
93 | return $this->visualDiff($name, $resolutions); |
|
94 | }); |
|
95 | } |
|
96 | } |
|
97 | } |