From eaded31e9fe50d15080dc6a2148b910ec996791a Mon Sep 17 00:00:00 2001 From: Yves Hoppe Date: Sat, 31 Oct 2015 11:14:06 +0100 Subject: [PATCH 1/3] Added check if repo has ending slash --- src/JoomlaBrowser.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 7625583..7c327aa 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -335,6 +335,13 @@ public function installExtensionFromFolder($path, $type = 'Extension') $I->waitForText('Extensions: Install','30', ['css' => 'H1']); $I->click(['link' => 'Install from Folder']); $this->debug('I enter the Path'); + + //Make sure path has an ending slash + if (substr($path, -1) != "/") + { + $path = $path . "/"; + } + $I->fillField(['id' => 'install_directory'], $path); // @todo: we need to find a better locator for the following Install button $I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton3()')]"]); // Install button From 203831b0eba332cdd2c0efce40aa06b2acf71109 Mon Sep 17 00:00:00 2001 From: Yves Hoppe Date: Sat, 31 Oct 2015 15:19:57 +0100 Subject: [PATCH 2/3] Added check if repo has ending slash --- src/JoomlaBrowser.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 7c327aa..bf28cc0 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -337,10 +337,7 @@ public function installExtensionFromFolder($path, $type = 'Extension') $this->debug('I enter the Path'); //Make sure path has an ending slash - if (substr($path, -1) != "/") - { - $path = $path . "/"; - } + $path = rtrim($path, "/") . "/"; $I->fillField(['id' => 'install_directory'], $path); // @todo: we need to find a better locator for the following Install button From 9ec926115a6d3e7ff90dc080c367e68da262da64 Mon Sep 17 00:00:00 2001 From: Yves Hoppe Date: Sat, 31 Oct 2015 15:22:35 +0100 Subject: [PATCH 3/3] Added check if repo has ending slash --- src/JoomlaBrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index bf28cc0..33a48ba 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -337,7 +337,7 @@ public function installExtensionFromFolder($path, $type = 'Extension') $this->debug('I enter the Path'); //Make sure path has an ending slash - $path = rtrim($path, "/") . "/"; + $path = rtrim($path, "/") . "/"; $I->fillField(['id' => 'install_directory'], $path); // @todo: we need to find a better locator for the following Install button