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