File tree Expand file tree Collapse file tree 13 files changed +81
-17
lines changed
Expand file tree Collapse file tree 13 files changed +81
-17
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,7 @@ public function handle(): void
4141 '--provider ' => RootServiceProvider::class,
4242 '--tag ' => 'root-stubs ' ,
4343 ]);
44+
45+ $ this ->info ('Root has been installed. ' );
4446 }
4547}
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ public function handle(): void
3737 $ this ->option ('force ' ) ? ['--force ' => true ] : [],
3838 ['--tag ' => $ this ->option ('tag ' ) ?: ['root-compiled ' ]]
3939 ));
40+
41+ $ this ->info ('Root files has been publised. ' );
4042 }
4143
4244 /**
Original file line number Diff line number Diff line change 33namespace {{ namespace }}Providers;
44
55use {{ namespace }}Models\User;
6- use {{ namespace }}Root\Resources\UserResource;
6+ use {{ namespace }}Root\Resources\UserResource;
77use Cone\Root\Interfaces\Models\User as UserInterface;
88use Cone\Root\Root;
99use Cone\Root\Widgets\Welcome;
Original file line number Diff line number Diff line change 44
55use Cone \Root \Tests \TestCase ;
66use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
78
89class ActionMakeTest extends TestCase
910{
10- public function test_an_action_make_command_creates_action (): void
11+ public function test_action_make_command (): void
1112 {
1213 $ this ->artisan ('root:action ' , ['name ' => 'TestAction ' ])
1314 ->assertExitCode (Command::SUCCESS );
@@ -17,7 +18,7 @@ public function test_an_action_make_command_creates_action(): void
1718
1819 public function tearDown (): void
1920 {
20- unlink ($ this ->app ->path ('/ Root/Actions/TestAction.php ' ));
21+ File:: delete ($ this ->app ->path ('Root/Actions/TestAction.php ' ));
2122
2223 parent ::tearDown ();
2324 }
Original file line number Diff line number Diff line change 77use Illuminate \Http \UploadedFile ;
88use Illuminate \Support \Facades \Storage ;
99
10- class CommandsTest extends TestCase
10+ class ClearChunkTest extends TestCase
1111{
12- public function test_a_command_can_clear_chunks (): void
12+ public function test_clear_chunk_command (): void
1313 {
1414 Storage::disk ('local ' )->putFileAs (
1515 '' ,
Original file line number Diff line number Diff line change 44
55use Cone \Root \Tests \TestCase ;
66use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
78
89class FieldMakeTest extends TestCase
910{
10- public function test_a_field_make_command_creates_field (): void
11+ public function test_field_make_command (): void
1112 {
1213 $ this ->artisan ('root:field ' , [
1314 'name ' => 'TestField ' ,
@@ -20,7 +21,7 @@ public function test_a_field_make_command_creates_field(): void
2021
2122 public function tearDown (): void
2223 {
23- unlink ($ this ->app ->path ('/ Root/Fields/TestField.php ' ));
24+ File:: delete ($ this ->app ->path ('Root/Fields/TestField.php ' ));
2425
2526 parent ::tearDown ();
2627 }
Original file line number Diff line number Diff line change 44
55use Cone \Root \Tests \TestCase ;
66use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
78
89class FilterMakeTest extends TestCase
910{
10- public function test_a_filter_make_command_creates_filter (): void
11+ public function test_filter_make_command (): void
1112 {
1213 $ this ->artisan ('root:filter ' , [
1314 'name ' => 'TestFilter ' ,
@@ -21,7 +22,7 @@ public function test_a_filter_make_command_creates_filter(): void
2122
2223 public function tearDown (): void
2324 {
24- unlink ($ this ->app ->path ('/ Root/Filters/TestFilter.php ' ));
25+ File:: delete ($ this ->app ->path ('Root/Filters/TestFilter.php ' ));
2526
2627 parent ::tearDown ();
2728 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Cone \Root \Tests \Console ;
4+
5+ use Cone \Root \Tests \TestCase ;
6+ use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
8+
9+ class InstallTest extends TestCase
10+ {
11+ public function test_install_command (): void
12+ {
13+ $ this ->artisan ('root:install ' , ['--seed ' => true ])
14+ ->expectsOutput ('Root has been installed. ' )
15+ ->assertExitCode (Command::SUCCESS );
16+
17+ $ this ->assertDirectoryExists ($ this ->app ->storagePath ('framework/testing/disks/local/root-tmp ' ));
18+ }
19+
20+ public function tearDown (): void
21+ {
22+ File::deleteDirectory ($ this ->app ->path ('Root ' ));
23+ File::delete ($ this ->app ->path ('Providers/RootServiceProvider.php ' ));
24+
25+ parent ::tearDown ();
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Cone \Root \Tests \Console ;
4+
5+ use Cone \Root \Tests \TestCase ;
6+ use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
8+
9+ class PublishTest extends TestCase
10+ {
11+ public function test_publish_command (): void
12+ {
13+ $ this ->artisan ('root:publish ' , ['--packages ' => true ])
14+ ->expectsOutput ('Root files has been publised. ' )
15+ ->assertExitCode (Command::SUCCESS );
16+
17+ $ this ->assertDirectoryExists ($ this ->app ->publicPath ('vendor/root ' ));
18+ }
19+
20+ public function tearDown (): void
21+ {
22+ File::deleteDirectory ($ this ->app ->publicPath ('vendor ' ));
23+
24+ parent ::tearDown ();
25+ }
26+ }
Original file line number Diff line number Diff line change 44
55use Cone \Root \Tests \TestCase ;
66use Illuminate \Console \Command ;
7+ use Illuminate \Support \Facades \File ;
78
89class ResourceMakeTest extends TestCase
910{
10- public function test_a_resource_make_command_creates_resource (): void
11+ public function test_resource_make_command (): void
1112 {
1213 $ this ->artisan ('root:resource ' , ['name ' => 'TestResource ' ])
1314 ->assertExitCode (Command::SUCCESS );
@@ -17,7 +18,7 @@ public function test_a_resource_make_command_creates_resource(): void
1718
1819 public function tearDown (): void
1920 {
20- unlink ($ this ->app ->path ('/ Root/Resources/TestResource.php ' ));
21+ File:: delete ($ this ->app ->path ('Root/Resources/TestResource.php ' ));
2122
2223 parent ::tearDown ();
2324 }
You can’t perform that action at this time.
0 commit comments