Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 5295a24

Browse files
committed
Add screenshot
1 parent 875c589 commit 5295a24

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ $this->get('/')
154154

155155
If 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

src/VisualDiffServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

src/VisualDiffTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()));

0 commit comments

Comments
 (0)