diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index b0f96b721..72a8c56d9 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -45,6 +45,10 @@ public function handle() $this->createConsoleDirectory(); } + if (! is_dir(base_path('tests/Browser/source'))) { + $this->createSourceDirectory(); + } + $stubs = [ 'ExampleTest.stub' => base_path('tests/Browser/ExampleTest.php'), 'HomePage.stub' => base_path('tests/Browser/Pages/HomePage.php'), @@ -100,6 +104,20 @@ protected function createConsoleDirectory() file_put_contents(base_path('tests/Browser/console/.gitignore'), '* !.gitignore +'); + } + + /** + * Create the source directory. + * + * @return void + */ + protected function createSourceDirectory() + { + mkdir(base_path('tests/Browser/source'), 0755, true); + + file_put_contents(base_path('tests/Browser/source/.gitignore'), '* +!.gitignore '); } }