We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 422f29a commit 82523e5Copy full SHA for 82523e5
tests/PresentersTest.php
@@ -40,6 +40,21 @@
40
->toEqual('en');
41
})->group('Presenter Implementation');
42
43
+it('throws an exception if the presenter type does not exists', function () {
44
+ $user = new User([
45
+ 'first_name' => 'John',
46
+ 'last_name' => 'Doe',
47
+ 'email' => '[email protected]',
48
+ 'password' => '123',
49
+ ]);
50
+
51
+ $user->present('profile')->lang;
52
53
+})->throws(
54
+ Coderflex\LaravelPresenter\Exceptions\PresenterException::class,
55
+ 'Presenter not found'
56
+)->group('Presenter Implementation');
57
58
it('should implements CanPresent Interface', function () {
59
$post = new Post([
60
'title' => 'a title for a post',
0 commit comments