File tree Expand file tree Collapse file tree 6 files changed +18
-12
lines changed Expand file tree Collapse file tree 6 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ interface CanPresent
11
11
* @return mixed
12
12
*/
13
13
public function present (string $ type = 'default ' );
14
- }
14
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Coderflex \LaravelPresenter \Tests \Models ;;
3
+ namespace Coderflex \LaravelPresenter \Tests \Models ;
4
+
5
+ ;
4
6
5
7
use Coderflex \LaravelPresenter \Concerns \UsesPresenters ;
6
8
use Coderflex \LaravelPresenter \Tests \Presenters \PostPresenter ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Coderflex \LaravelPresenter \Tests \Models ;;
3
+ namespace Coderflex \LaravelPresenter \Tests \Models ;
4
+
5
+ ;
4
6
5
7
use Coderflex \LaravelPresenter \Concerns \CanPresent ;
6
8
use Coderflex \LaravelPresenter \Concerns \UsesPresenters ;
@@ -16,4 +18,4 @@ class User extends Model implements CanPresent
16
18
protected $ presenters = [
17
19
'default ' => UserPresenter::class,
18
20
];
19
- }
21
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Coderflex \LaravelPresenter \Tests \Presenters ;;
3
+ namespace Coderflex \LaravelPresenter \Tests \Presenters ;
4
+
5
+ ;
4
6
5
- use Illuminate \Support \Str ;
6
7
use Coderflex \LaravelPresenter \Presenter ;
8
+ use Illuminate \Support \Str ;
7
9
8
10
class PostPresenter extends Presenter
9
11
{
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace Coderflex \LaravelPresenter \Tests \Presenters ;;
3
+ namespace Coderflex \LaravelPresenter \Tests \Presenters ;
4
+
5
+ ;
4
6
5
7
use Coderflex \LaravelPresenter \Presenter ;
6
8
Original file line number Diff line number Diff line change 7
7
$ this ->artisan ('presenter:make ' )
8
8
->assertExitCode (1 );
9
9
})->throws (
10
- Symfony \Component \Console \Exception \RuntimeException::class,
10
+ Symfony \Component \Console \Exception \RuntimeException::class,
11
11
'Not enough arguments (missing: "name"). '
12
12
)->group ('Presenter Command ' );
13
13
21
21
'first_name ' => 'John ' ,
22
22
'last_name ' => 'Doe ' ,
23
23
24
- 'password ' => '123 '
24
+ 'password ' => '123 ' ,
25
25
]);
26
26
27
27
expect ($ user ->present ()->fullName )
30
30
31
31
it ('should implements CanPresent Interface ' , function () {
32
32
$ post = new Post ([
33
- 'title ' => 'a title for a post '
33
+ 'title ' => 'a title for a post ' ,
34
34
]);
35
35
36
36
$ post ->present ()->slug ;
37
37
})->throws (
38
38
Coderflex \LaravelPresenter \Exceptions \PresenterException::class,
39
39
'Coderflex\LaravelPresenter\Tests\Models\Post should implements \Coderflex\LaravelPresenter\Concerns\CanPresent interface '
40
40
)->group ('Presenter Implementation ' );
41
-
42
-
You can’t perform that action at this time.
0 commit comments