Skip to content

Commit

Permalink
refactor: Remove TogglesHeadlessMode redundant methods
Browse files Browse the repository at this point in the history
laravel/dusk#1098

Laravel Dusk 8.x now defines these methods in class
Laravel\Dusk\TestCase so the stub classes that extend
TestCase don't need to redefine hasHeadlessDisabled()
and shouldStartMaximized().
  • Loading branch information
derekmd committed Oct 20, 2024
1 parent d798ea5 commit b89458b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/Concerns/TogglesHeadlessMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,4 @@ protected function filterHeadlessArguments(array $args = [])
]);
})->values()->all();
}

/**
* Determine whether the Dusk command has disabled headless mode.
*
* @return bool
*/
protected function hasHeadlessDisabled()
{
return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
isset($_ENV['DUSK_HEADLESS_DISABLED']);
}

/**
* Determine if the browser window should start maximized.
*
* @return bool
*/
protected function shouldStartMaximized()
{
return isset($_SERVER['DUSK_START_MAXIMIZED']) ||
isset($_ENV['DUSK_START_MAXIMIZED']);
}
}

0 comments on commit b89458b

Please sign in to comment.