From b89458ba8cc59462612e25449a207f29eef6a93d Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 20 Oct 2024 12:59:02 -0400 Subject: [PATCH] refactor: Remove TogglesHeadlessMode redundant methods https://github.com/laravel/dusk/pull/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(). --- src/Concerns/TogglesHeadlessMode.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/Concerns/TogglesHeadlessMode.php b/src/Concerns/TogglesHeadlessMode.php index 57e4a17..b4df78e 100644 --- a/src/Concerns/TogglesHeadlessMode.php +++ b/src/Concerns/TogglesHeadlessMode.php @@ -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']); - } }