From 57162ef481ca55e29f1a8cb1048ea98d33411d0a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 3 Jan 2020 09:18:47 +0100 Subject: [PATCH] Make install.php accept long Chrome version string [skip ci] --- tests/Browser/README.md | 8 ++++++-- tests/Browser/install.php | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Browser/README.md b/tests/Browser/README.md index 00eb4f234..036c0e27b 100644 --- a/tests/Browser/README.md +++ b/tests/Browser/README.md @@ -14,11 +14,15 @@ INSTALLATION Installation: -1. Add `"laravel/dusk": "~5.7.0"` to your composer.json file and run `composer update`. +0. Note that the suite has been tested with PHP 7.3 and 7.4. +1. Install Laravel Dusk with all dependencies. +``` +composer require "laravel/dusk:~5.7.0" +``` 2. Install Chrome WebDriver for the version of Chrome/Chromium in your system. Yes, you have to have Chrome/Chromium installed. ``` -php tests/Browser/install.php [version]` +php tests/Browser/install.php [version] ``` 3. Configure the test account and Roundcube instance. diff --git a/tests/Browser/install.php b/tests/Browser/install.php index 4fba9022d..295e248e0 100644 --- a/tests/Browser/install.php +++ b/tests/Browser/install.php @@ -35,7 +35,8 @@ class Installer extends Laravel\Dusk\Console\ChromeDriverCommand */ public function install($version = null) { - $version = trim($this->getUrl(sprintf($this->versionUrl, $version ?: $this->latestVersion()))); + $version = $version ? preg_replace('/\..*/', '', $version) : $this->latestVersion(); + $version = trim($this->getUrl(sprintf($this->versionUrl, $version))); $currentOS = Laravel\Dusk\OperatingSystem::id(); foreach ($this->slugs as $os => $slug) {