This repository was archived by the owner on Apr 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ $this->get('/')
154154
155155If you use [ iTerm2] ( https://www.iterm2.com/ ) as your terminal of choice, you will see an image representation of the diff when you run your tests.
156156
157- --SCREENSHOT--
157+ ![ iTerm 2 ] ( https://beyondco.de/github/visualdiff.png )
158158
159159### Changelog
160160
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ public function register()
4646 $ tester ->setDiffOutputPath (config ('visualdiff.diff_path ' ));
4747
4848 $ tester ->createDiffs ();
49+
50+ return $ this ;
4951 });
5052
5153 TestResponse::macro ('visualDiffForResolutions ' , function (array $ resolutions , $ name = null ) {
@@ -54,7 +56,7 @@ public function register()
5456 $ name = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS , 5 )[4 ]['function ' ];
5557 }
5658
57- $ this ->visualDiff ($ name , $ resolutions );
59+ return $ this ->visualDiff ($ name , $ resolutions );
5860 });
5961
6062 if (class_exists (Browser::class)) {
@@ -78,6 +80,8 @@ public function register()
7880 $ tester ->setDiffOutputPath (config ('visualdiff.diff_path ' ));
7981
8082 $ tester ->createDiffs ();
83+
84+ return $ this ;
8185 });
8286
8387 Browser::macro ('visualDiffForResolutions ' , function (array $ resolutions , $ name = null ) {
@@ -86,7 +90,7 @@ public function register()
8690 $ name = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS , 7 )[6 ]['function ' ];
8791 }
8892
89- $ this ->visualDiff ($ name , $ resolutions );
93+ return $ this ->visualDiff ($ name , $ resolutions );
9094 });
9195 }
9296 }
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ protected function createDiff()
149149 config ('visualdiff.maximum_error_percentage ' ),
150150 $ result ->error_percentage ,
151151 "The visual diff for " . $ this ->name . " has a higher pixel diff than the allowed maximum. " . PHP_EOL .
152- "See: " . $ this ->getDiffFilename ()
152+ "See: " . $ this ->diffOutputPath . $ this -> getDiffFilename ()
153153 );
154154 } catch (ExpectationFailedException $ e ) {
155155 echo exec (__DIR__ . '/../bin/imgcat ' . escapeshellarg ($ this ->diffOutputPath . DIRECTORY_SEPARATOR . $ this ->getDiffFilename ()));
You can’t perform that action at this time.
0 commit comments