Skip to content

Commit

Permalink
[develop] Uses Tests\CreatesApplication only if exists (#1074)
Browse files Browse the repository at this point in the history
* Uses CreatesApplication if exists

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
nunomaduro and StyleCIBot authored Jan 3, 2024
1 parent 830e86c commit 6f0cf18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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...');
Expand Down

0 comments on commit 6f0cf18

Please sign in to comment.