File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 6
6
use Illuminate \Support \Facades \View ;
7
7
use Symfony \Component \HttpFoundation \Response ;
8
8
use Orchestra \Testbench \TestCase as OrchestraTestCase ;
9
+ use Spatie \ViewModels \Providers \ViewModelsServiceProvider ;
9
10
10
11
class TestCase extends OrchestraTestCase
11
12
{
@@ -31,4 +32,9 @@ protected function getResponseBody(Response $response): array
31
32
{
32
33
return json_decode ($ response ->getContent (), true );
33
34
}
35
+
36
+ protected function getPackageProviders ($ app )
37
+ {
38
+ return [ ViewModelsServiceProvider::class ];
39
+ }
34
40
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Spatie \ViewModels \Tests ;
4
+
5
+ use Illuminate \Http \Response ;
6
+ use Illuminate \Http \JsonResponse ;
7
+ use Illuminate \Support \Facades \Artisan ;
8
+
9
+ class ViewModelMakeCommandTest extends TestCase
10
+ {
11
+ /** @test */
12
+ public function command_returns_signal_zero ()
13
+ {
14
+ $ a = Artisan::call ('make:view-model ' , [ 'name ' => 'PostsViewModel ' ]);
15
+
16
+ $ b = Artisan::output ();
17
+
18
+ dd ($ a , $ b );
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments