File tree Expand file tree Collapse file tree 10 files changed +73
-37
lines changed Expand file tree Collapse file tree 10 files changed +73
-37
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ Installation
23
23
Install this command as a global composer package
24
24
25
25
``` bash
26
- $ composer global require Diskominfotik-Banda-Aceh/pest-scaffold-cli
26
+ $ composer global require diskominfotik-banda-aceh/pest-scaffold-cli
27
+ ```
28
+ Copy this provider to the ` config/app.php `
29
+ ``` bash
30
+ DiskominfotikBandaAceh\P estScaffoldCli\P roviders\P estTestProvider::class,
27
31
```
28
32
29
33
Usage
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " diskominfotik-banda-aceh/pest-scaffold-cli" ,
3
3
"description" : " Console commands to generate a directory structure for scaffold pest PHP testing files" ,
4
- "type" : " library" ,
5
4
"autoload" : {
6
5
"psr-4" : {
7
6
"DiskominfotikBandaAceh\\ PestScaffoldCli\\ " : " src/"
8
7
}
9
8
},
10
- "license" : " MIT" ,
11
9
"authors" : [
12
10
{
13
11
"name" : " Diskominfotik Banda Aceh" ,
14
12
15
13
}
16
14
],
17
- "minimum-stability" : " stable" ,
18
15
"require" : {
19
- "php" : " ^7.0" ,
20
- "symfony/console" : " ^4.0"
16
+
17
+ },
18
+ "require-dev" : {
19
+ "pestphp/pest" : " ^v1.21.3"
21
20
}
22
21
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DiskominfotikBandaAceh \PestScaffoldCli ;
3
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \ Commands ;
4
4
5
5
use Illuminate \Console \GeneratorCommand ;
6
6
use Illuminate \Support \Str ;
7
7
use Symfony \Component \Console \Input \InputArgument ;
8
+ use function base_path ;
8
9
9
10
class PestCreateTest extends GeneratorCommand
10
11
{
@@ -84,7 +85,7 @@ protected function getArguments()
84
85
}
85
86
86
87
protected function getStub (){
87
- return $ this ->resolveStubPath ('/stubs /controller-create-test.stub ' );
88
+ return $ this ->resolveStubPath ('/../../templates /controller-create-test.stub ' );
88
89
}
89
90
90
91
/**
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DiskominfotikBandaAceh \PestScaffoldCli ;
3
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \ Commands ;
4
4
5
5
use Illuminate \Console \GeneratorCommand ;
6
6
use Illuminate \Support \Str ;
7
7
use Symfony \Component \Console \Input \InputArgument ;
8
+ use function base_path ;
8
9
9
10
class PestDeleteTest extends GeneratorCommand
10
11
{
@@ -84,7 +85,7 @@ protected function getArguments()
84
85
}
85
86
86
87
protected function getStub (){
87
- return $ this ->resolveStubPath ('/stubs /controller-delete-test.stub ' );
88
+ return $ this ->resolveStubPath ('/../../templates /controller-delete-test.stub ' );
88
89
}
89
90
90
91
/**
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DiskominfotikBandaAceh \PestScaffoldCli ;
3
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \ Commands ;
4
4
5
5
use Illuminate \Console \GeneratorCommand ;
6
6
use Illuminate \Support \Str ;
7
7
use Symfony \Component \Console \Input \InputArgument ;
8
+ use function base_path ;
8
9
9
10
class PestReadTest extends GeneratorCommand
10
11
{
@@ -84,7 +85,7 @@ protected function getArguments()
84
85
}
85
86
86
87
protected function getStub (){
87
- return $ this ->resolveStubPath ('/stubs /controller-read-test.stub ' );
88
+ return $ this ->resolveStubPath ('/../../templates /controller-read-test.stub ' );
88
89
}
89
90
90
91
/**
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DiskominfotikBandaAceh \PestScaffoldCli ;
3
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \ Commands ;
4
4
5
5
use Illuminate \Console \GeneratorCommand ;
6
6
use Illuminate \Support \Str ;
7
7
use Symfony \Component \Console \Input \InputArgument ;
8
+ use function base_path ;
8
9
9
10
class PestTest extends GeneratorCommand
10
11
{
@@ -129,7 +130,7 @@ protected function getArguments()
129
130
}
130
131
131
132
protected function getStub (){
132
- return $ this ->resolveStubPath ('/stubs /controller-index-test.stub ' );
133
+ return $ this ->resolveStubPath ('/../../templates /controller-index-test.stub ' );
133
134
}
134
135
135
136
/**
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- namespace DiskominfotikBandaAceh \PestScaffoldCli ;
3
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \ Commands ;
4
4
5
5
use Illuminate \Console \GeneratorCommand ;
6
6
use Illuminate \Support \Str ;
7
7
use Symfony \Component \Console \Input \InputArgument ;
8
+ use function base_path ;
8
9
9
10
class PestUpdateTest extends GeneratorCommand
10
11
{
@@ -84,7 +85,7 @@ protected function getArguments()
84
85
}
85
86
86
87
protected function getStub (){
87
- return $ this ->resolveStubPath ('/stubs /controller-update-test.stub ' );
88
+ return $ this ->resolveStubPath ('/../../templates /controller-update-test.stub ' );
88
89
}
89
90
90
91
/**
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace DiskominfotikBandaAceh \PestScaffoldCli \Providers ;
3
+
4
+ use Illuminate \Support \ServiceProvider ;
5
+
6
+ class PestTestProvider extends ServiceProvider {
7
+
8
+ protected $ commands = [
9
+ 'DiskominfotikBandaAceh\PestScaffoldCli\Commands\PestTest ' ,
10
+ 'DiskominfotikBandaAceh\PestScaffoldCli\Commands\PestCreateTest ' ,
11
+ 'DiskominfotikBandaAceh\PestScaffoldCli\Commands\PestReadTest ' ,
12
+ 'DiskominfotikBandaAceh\PestScaffoldCli\Commands\PestUpdateTest ' ,
13
+ 'DiskominfotikBandaAceh\PestScaffoldCli\Commands\PestDeleteTest ' ,
14
+ ];
15
+
16
+ public function register (){
17
+ $ this ->commands ($ this ->commands );
18
+ }
19
+
20
+ /**
21
+ * Bootstrap services.
22
+ *
23
+ * @return void
24
+ */
25
+ public function boot ()
26
+ {
27
+
28
+ }
29
+ }
30
+
31
+ ?>
You can’t perform that action at this time.
0 commit comments