Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Dec 9, 2024
1 parent bc21766 commit 6ec027d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ public function handle(Filesystem $filesystem)
$this->copyTestbenchConfigurationFile($filesystem, $workingPath);
$this->copyTestbenchDotEnvFile($filesystem, $workingPath);

if ($this->hasTestbenchDusk) {
$this->replaceInFile($filesystem, ["laravel: '@testbench'"], ["laravel: '@testbench-dusk'"], join_paths($workingPath, 'testbench.yaml'));
}
$this->replaceDefaultLaravelSkeletonInTestbenchConfigurationFile($filesystem, $workingPath);

$this->call('workbench:create-sqlite-db', ['--force' => true]);

Expand Down Expand Up @@ -151,6 +149,20 @@ protected function copyTestbenchDotEnvFile(Filesystem $filesystem, string $worki
);
}

/**
* Replace the default `laravel` skeleton for Testbench Dusk.
*
* @codeCoverageIgnore
*/
protected function replaceDefaultLaravelSkeletonInTestbenchConfigurationFile(Filesystem $filesystem, string $workingPath): void
{
if ($this->hasTestbenchDusk === false) {
return;
}

$this->replaceInFile($filesystem, ["laravel: '@testbench'"], ["laravel: '@testbench-dusk'"], join_paths($workingPath, 'testbench.yaml'));
}

/**
* Generate separate `.env.dusk` equivalent for Testbench Dusk.
*
Expand Down

0 comments on commit 6ec027d

Please sign in to comment.