From 2e91df1c0703c5b8b1038d1ba113dfb2a520bfab Mon Sep 17 00:00:00 2001 From: Francesco Abeni Date: Sat, 31 Oct 2015 12:10:07 +0100 Subject: [PATCH] Add url parameter for counter test --- tests/acceptance.suite.dist.yml | 1 + tests/acceptance/frontend/FrontendWeblinksCest.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/acceptance.suite.dist.yml b/tests/acceptance.suite.dist.yml index 44770cb..fb7b6a3 100644 --- a/tests/acceptance.suite.dist.yml +++ b/tests/acceptance.suite.dist.yml @@ -37,4 +37,5 @@ modules: language: 'English (United Kingdom)' # Language in which you want the Application to be Installed AcceptanceHelper: repo_folder: '/home/travis/build/joomla-extensions/weblinks/' # Path to the Extension repository. To be used by tests to install via Install from folder + counter_test_url: 'http://localhost/tests/joomla-cms3' # the url for the weblink item used to test hits counter error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED" \ No newline at end of file diff --git a/tests/acceptance/frontend/FrontendWeblinksCest.php b/tests/acceptance/frontend/FrontendWeblinksCest.php index e1f3ac5..35b7372 100644 --- a/tests/acceptance/frontend/FrontendWeblinksCest.php +++ b/tests/acceptance/frontend/FrontendWeblinksCest.php @@ -55,7 +55,7 @@ class FrontendWeblinksCest public function hitsAreNotIncrementedIfCountClicksIsOff(\Step\Acceptance\weblink $I) { $title = 'Weblink' . $this->faker->randomNumber(); - $url = $this->faker->url(); + $url = $I->getConfiguration('counter_test_url'); $I->am('Administrator'); $I->wantToTest('Hits are not incremented if Count Clicks is off'); @@ -89,7 +89,7 @@ class FrontendWeblinksCest public function hitsAreIncrementedIfCountClicksIsOn(\Step\Acceptance\weblink $I) { $title = 'Weblink' . $this->faker->randomNumber(); - $url = $this->faker->url(); + $url = $I->getConfiguration('counter_test_url'); $I->am('Administrator'); $I->wantToTest('Hits are incremented if Count Clicks is on');