From 3decf1b658d7406bb1003c73eac017af6f69be76 Mon Sep 17 00:00:00 2001 From: Stefan Totev Date: Mon, 23 Sep 2019 23:26:51 +0100 Subject: [PATCH] Normalize Base URL during installation - Fix base url when is appended with a script filename - Add default base url http://flarum.local when CLI wizard used - Remove some code duplication - Add minor improvement to the UX when CLI wizard used - Add tests - Extract base url normalisation into its own value object --- php-packages/testing/tests/integration/setup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php-packages/testing/tests/integration/setup.php b/php-packages/testing/tests/integration/setup.php index 45f0a382d..8678b522f 100644 --- a/php-packages/testing/tests/integration/setup.php +++ b/php-packages/testing/tests/integration/setup.php @@ -10,6 +10,7 @@ */ use Flarum\Install\AdminUser; +use Flarum\Install\BaseUrl; use Flarum\Install\DatabaseConfig; use Flarum\Install\Installation; @@ -48,7 +49,7 @@ $installation = new Installation( $pipeline = $installation ->configPath('config.php') ->debugMode(true) - ->baseUrl('http://localhost') + ->baseUrl(BaseUrl::fromString('http://localhost')) ->databaseConfig(new DatabaseConfig( 'mysql', env('DB_HOST', 'localhost'),