Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function handle() |
||
32 | { |
||
33 | if (! is_dir($directory = base_path('tests/Feature'))) { |
||
34 | mkdir($directory, 0755, true); |
||
35 | } |
||
36 | |||
37 | $filesystem = new Filesystem; |
||
38 | |||
39 | collect($filesystem->allFiles(__DIR__.'/stubs/Tests')) |
||
|
|||
40 | ->each(function (SplFileInfo $file) use ($filesystem) { |
||
41 | $filesystem->copy( |
||
42 | $file->getPathname(), |
||
43 | base_path('tests/Feature/'.Str::replaceLast('.stub', '.php', $file->getFilename())) |
||
44 | ); |
||
45 | }); |
||
46 | |||
47 | $this->components->info('Tests scaffolding generated successfully.'); |
||
48 | } |
||
50 |