diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 01ca940a4..62d7597ed 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -62,6 +62,20 @@ public function handle() } } + $baseTestCase = file_get_contents(base_path('tests/DuskTestCase.php')); + + if (! trait_exists(\Tests\CreatesApplication::class)) { + file_put_contents(base_path('tests/DuskTestCase.php'), str_replace(<<<'EOT' + { + use CreatesApplication; + + EOT, <<<'EOT' + { + EOT, + $baseTestCase, + )); + } + $this->info('Dusk scaffolding installed successfully.'); $this->comment('Downloading ChromeDriver binaries...');