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
1111 * @return mixed
1212 */
1313 public function present (string $ type = 'default ' );
14- }
14+ }
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Coderflex \LaravelPresenter \Tests \Models ;;
3+ namespace Coderflex \LaravelPresenter \Tests \Models ;
4+
5+ ;
46
57use Coderflex \LaravelPresenter \Concerns \UsesPresenters ;
68use Coderflex \LaravelPresenter \Tests \Presenters \PostPresenter ;
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Coderflex \LaravelPresenter \Tests \Models ;;
3+ namespace Coderflex \LaravelPresenter \Tests \Models ;
4+
5+ ;
46
57use Coderflex \LaravelPresenter \Concerns \CanPresent ;
68use Coderflex \LaravelPresenter \Concerns \UsesPresenters ;
@@ -16,4 +18,4 @@ class User extends Model implements CanPresent
1618 protected $ presenters = [
1719 'default ' => UserPresenter::class,
1820 ];
19- }
21+ }
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Coderflex \LaravelPresenter \Tests \Presenters ;;
3+ namespace Coderflex \LaravelPresenter \Tests \Presenters ;
4+
5+ ;
46
5- use Illuminate \Support \Str ;
67use Coderflex \LaravelPresenter \Presenter ;
8+ use Illuminate \Support \Str ;
79
810class PostPresenter extends Presenter
911{
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Coderflex \LaravelPresenter \Tests \Presenters ;;
3+ namespace Coderflex \LaravelPresenter \Tests \Presenters ;
4+
5+ ;
46
57use Coderflex \LaravelPresenter \Presenter ;
68
Original file line number Diff line number Diff line change 77 $ this ->artisan ('presenter:make ' )
88 ->assertExitCode (1 );
99})->throws (
10- Symfony \Component \Console \Exception \RuntimeException::class,
10+ Symfony \Component \Console \Exception \RuntimeException::class,
1111 'Not enough arguments (missing: "name"). '
1212)->group ('Presenter Command ' );
1313
2121 'first_name ' => 'John ' ,
2222 'last_name ' => 'Doe ' ,
2323 'email ' => 'john@example.com ' ,
24- 'password ' => '123 '
24+ 'password ' => '123 ' ,
2525 ]);
2626
2727 expect ($ user ->present ()->fullName )
3030
3131it ('should implements CanPresent Interface ' , function () {
3232 $ post = new Post ([
33- 'title ' => 'a title for a post '
33+ 'title ' => 'a title for a post ' ,
3434 ]);
3535
3636 $ post ->present ()->slug ;
3737})->throws (
3838 Coderflex \LaravelPresenter \Exceptions \PresenterException::class,
3939 'Coderflex\LaravelPresenter\Tests\Models\Post should implements \Coderflex\LaravelPresenter\Concerns\CanPresent interface '
4040)->group ('Presenter Implementation ' );
41-
42-
You can’t perform that action at this time.
0 commit comments