Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-07-28 19:12:52 +0300
committersgiehl <stefan@piwik.org>2015-10-06 17:23:54 +0300
commitd8cd9454d4f213acfb8df0d155fc4da9ae0a7a81 (patch)
treebd96523f4bae4cf38210f276ff84a91e23c57cf0
parente30de3346a74ea908ee1e9944dbc5686016e11a4 (diff)
starting to prepare the requirement of php 5.4
-rw-r--r--.travis.yml29
-rw-r--r--core/Plugin/ControllerAdmin.php15
-rw-r--r--tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php4
-rwxr-xr-xtests/PHPUnit/Framework/TestCase/SystemTestCase.php12
-rw-r--r--tests/PHPUnit/Framework/TestRequest/Response.php4
-rw-r--r--tests/PHPUnit/Integration/Plugin/SettingsTest.php1
-rw-r--r--tests/PHPUnit/System/ArchiveCronTest.php4
-rw-r--r--tests/PHPUnit/System/AutoSuggestAPITest.php4
-rw-r--r--tests/PHPUnit/System/CliMultiTest.php3
-rwxr-xr-xtests/PHPUnit/System/ManyVisitorsOneWebsiteTest.php90
-rw-r--r--tests/PHPUnit/System/PivotByQueryParamTest.php4
-rwxr-xr-xtests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest.php3
-rwxr-xr-xtests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysConversionsTest.php13
-rwxr-xr-xtests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php3
-rw-r--r--tests/PHPUnit/Unit/UrlHelperTest.php10
15 files changed, 62 insertions, 137 deletions
diff --git a/.travis.yml b/.travis.yml
index 13f3746920..e90e6ef332 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,7 @@ language: php
php:
- 5.6
- - 5.3.3
+ - 5.4.0
# - hhvm
services:
@@ -46,15 +46,15 @@ matrix:
- php: 7
exclude:
# Run test suites separately only on PHP 5.6 with PDO
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
- php: 7
env: TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=SystemTests MYSQL_ADAPTER=PDO_MYSQL
@@ -62,7 +62,7 @@ matrix:
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- php: hhvm
env: TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
- # run UI tests on PHP 5.3.3 only
+ # run UI tests on PHP 5.4.0 only
- php: 5.6
env: TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
- php: 5.6
@@ -70,21 +70,21 @@ matrix:
# run all tests not on PHP 5.6 and run MySQLI tests only on 5.6
- php: 5.6
env: TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
- php: 7
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
- php: hhvm
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
# Javascript tests need to run only on one PHP version
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
- php: hhvm
env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
- php: 7
env: TEST_SUITE=JavascriptTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
# AngularJS tests need to run only on one PHP version
- - php: 5.3.3
+ - php: 5.4.0
env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
- php: hhvm
env: TEST_SUITE=AngularJSTests MYSQL_ADAPTER=PDO_MYSQL SKIP_COMPOSER_INSTALL=1
@@ -95,15 +95,12 @@ sudo: required
script: $PIWIK_ROOT_DIR/tests/travis/travis.sh
-before_install:
- # do not use the Zend allocator on PHP 5.3 since it will randomly segfault after program execution
- - '[[ "$TRAVIS_PHP_VERSION" == 5.3* ]] && export USE_ZEND_ALLOC=0 || true'
-
install:
- git fetch -q
- - export GENERATE_TRAVIS_YML_COMMAND="php ./tests/travis/generator/main.php generate:travis-yml --core --verbose"
- - '[[ "$TRAVIS_JOB_NUMBER" != *.1 || "$TRAVIS_PULL_REQUEST" != "false" ]] || ./tests/travis/autoupdate_travis_yml.sh'
+ # Disable it until this is in master, otherwise we have to create a branch for travis submodule
+ #- export GENERATE_TRAVIS_YML_COMMAND="php ./tests/travis/generator/main.php generate:travis-yml --core --verbose"
+ #- '[[ "$TRAVIS_JOB_NUMBER" != *.1 || "$TRAVIS_PULL_REQUEST" != "false" ]] || ./tests/travis/autoupdate_travis_yml.sh'
- '[ ! -f ./tests/travis/install_mysql_5.6.sh ] || ./tests/travis/install_mysql_5.6.sh'
@@ -186,4 +183,4 @@ notifications:
- "irc.freenode.org#piwik-dev"
template:
- "%{repository} (%{commit}) : %{message} %{foo} "
- - "Build details: %{build_url}" \ No newline at end of file
+ - "Build details: %{build_url}"
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php
index 3431d70156..44357955be 100644
--- a/core/Plugin/ControllerAdmin.php
+++ b/core/Plugin/ControllerAdmin.php
@@ -124,14 +124,11 @@ abstract class ControllerAdmin extends Controller
private static function notifyWhenPhpVersionIsEOL()
{
- $notifyPhpIsEOL = Piwik::hasUserSuperUserAccess() && self::isPhpVersion53();
+ $notifyPhpIsEOL = Piwik::hasUserSuperUserAccess() && self::isPhpVersion54();
if (!$notifyPhpIsEOL) {
return;
}
- $dateDropSupport = Date::factory('2015-05-01')->getLocalized('%longMonth% %longYear%');
- $message = Piwik::translate('General_WarningPiwikWillStopSupportingPHPVersion', $dateDropSupport)
- . "\n "
- . Piwik::translate('General_WarningPhpVersionXIsTooOld', '5.3');
+ $message = Piwik::translate('General_WarningPhpVersionXIsTooOld', '5.4');
$notification = new Notification($message);
$notification->title = Piwik::translate('General_Warning');
@@ -139,7 +136,7 @@ abstract class ControllerAdmin extends Controller
$notification->context = Notification::CONTEXT_WARNING;
$notification->type = Notification::TYPE_TRANSIENT;
$notification->flags = Notification::FLAG_NO_CLEAR;
- NotificationManager::notify('PHP53VersionCheck', $notification);
+ NotificationManager::notify('PHP54VersionCheck', $notification);
}
private static function notifyWhenDebugOnDemandIsEnabled($trackerSetting)
@@ -237,11 +234,11 @@ abstract class ControllerAdmin extends Controller
private static function checkPhpVersion($view)
{
$view->phpVersion = PHP_VERSION;
- $view->phpIsNewEnough = version_compare($view->phpVersion, '5.3.0', '>=');
+ $view->phpIsNewEnough = version_compare($view->phpVersion, '5.4.0', '>=');
}
- private static function isPhpVersion53()
+ private static function isPhpVersion54()
{
- return strpos(PHP_VERSION, '5.3') === 0;
+ return strpos(PHP_VERSION, '5.4') === 0;
}
}
diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
index c413635c8e..9db794269d 100644
--- a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
+++ b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
@@ -268,10 +268,6 @@ class ManyVisitsWithGeoIP extends Fixture
// also fails on other PHP, is it really needed?
return;
- // this randomly fails on PHP 5.3
- if(strpos(PHP_VERSION, '5.3') === 0) {
- return;
- }
try {
LocationProvider::setCurrentProvider('default');
} catch(Exception $e) {
diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
index 7797751b9f..8446a66d16 100755
--- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
@@ -101,11 +101,6 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
return !empty($travis);
}
- public static function isPhpVersion53()
- {
- return strpos(PHP_VERSION, '5.3') === 0;
- }
-
public static function isPhp7orLater()
{
return version_compare('7.0.0-dev', PHP_VERSION) < 1;
@@ -601,13 +596,6 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
DbHelper::deleteArchiveTables();
}
- protected function skipWhenPhp53()
- {
- if(self::isPhpVersion53()) {
- $this->markTestSkipped('Sometimes fail on php 5.3');
- }
- }
-
public function assertHttpResponseText($expectedResponseText, $url, $message = '')
{
self::assertThat($url, new HttpResponseText($expectedResponseText), $message);
diff --git a/tests/PHPUnit/Framework/TestRequest/Response.php b/tests/PHPUnit/Framework/TestRequest/Response.php
index 5f8aea369e..6d729ca941 100644
--- a/tests/PHPUnit/Framework/TestRequest/Response.php
+++ b/tests/PHPUnit/Framework/TestRequest/Response.php
@@ -120,10 +120,6 @@ class Response
private function normalizeEncodingPhp533($apiResponse)
{
- if (!SystemTestCase::isPhpVersion53()
- || strpos($apiResponse, '<result') === false) {
- return $apiResponse;
- }
return str_replace('&amp;#039;', "'", $apiResponse);
}
diff --git a/tests/PHPUnit/Integration/Plugin/SettingsTest.php b/tests/PHPUnit/Integration/Plugin/SettingsTest.php
index f5ac688d31..679b84ccba 100644
--- a/tests/PHPUnit/Integration/Plugin/SettingsTest.php
+++ b/tests/PHPUnit/Integration/Plugin/SettingsTest.php
@@ -189,7 +189,6 @@ class SettingsTest extends IntegrationTestCase
public function test_getSettingsForCurrentUser_shouldReturnAllSettingsIfEnoughPermissionsAndSortThemBySettingOrder()
{
- $this->skipWhenPhp53();
$this->setSuperUser();
$this->addSystemSetting('mysystemsetting1', 'mytitle1');
diff --git a/tests/PHPUnit/System/ArchiveCronTest.php b/tests/PHPUnit/System/ArchiveCronTest.php
index db722f9266..dcdf8ca5e1 100644
--- a/tests/PHPUnit/System/ArchiveCronTest.php
+++ b/tests/PHPUnit/System/ArchiveCronTest.php
@@ -78,10 +78,6 @@ class ArchiveCronTest extends SystemTestCase
public function testArchivePhpCron()
{
- if(self::isPhpVersion53()) {
- $this->markTestSkipped('Fails on PHP 5.3 once in a blue moon.');
- }
-
$this->setLastRunArchiveOptions();
$output = $this->runArchivePhpCron();
diff --git a/tests/PHPUnit/System/AutoSuggestAPITest.php b/tests/PHPUnit/System/AutoSuggestAPITest.php
index 2ec2900f5e..2cb5e0282d 100644
--- a/tests/PHPUnit/System/AutoSuggestAPITest.php
+++ b/tests/PHPUnit/System/AutoSuggestAPITest.php
@@ -41,10 +41,6 @@ class AutoSuggestAPITest extends SystemTestCase
// Refresh cache for CustomVariables\Model
Cache::clearCacheGeneral();
- if(self::isPhpVersion53() && self::isTravisCI()) {
- $this->markTestSkipped("Skipping this test as it seg faults on php 5.3 (bug triggered on travis)");
- }
-
$this->runApiTests($api, $params);
}
diff --git a/tests/PHPUnit/System/CliMultiTest.php b/tests/PHPUnit/System/CliMultiTest.php
index 55e95e0066..23ea2e68a3 100644
--- a/tests/PHPUnit/System/CliMultiTest.php
+++ b/tests/PHPUnit/System/CliMultiTest.php
@@ -83,7 +83,6 @@ class CliMultiTest extends SystemTestCase
public function test_request_shouldRunAsync()
{
- $this->skipWhenPhp53();
$this->assertTrue($this->cliMulti->supportsAsync);
}
@@ -143,7 +142,6 @@ class CliMultiTest extends SystemTestCase
*/
public function test_request_shouldDetectFinishOfRequest_IfNoParamsAreGiven()
{
- $this->skipWhenPhp53();
$this->cliMulti->runAsSuperUser();
$response = $this->cliMulti->request(array($this->completeUrl('')));
$this->assertStringStartsWith('Error in Piwik: Error: no website was found', $response[0]);
@@ -151,7 +149,6 @@ class CliMultiTest extends SystemTestCase
public function test_request_shouldBeAbleToRenderARegularPageInPiwik()
{
- $this->skipWhenPhp53();
Fixture::createWebsite('2014-01-01 00:00:00');
$urls = array($this->completeUrl('/?module=Widgetize&idSite=1&period=day&date=today'));
diff --git a/tests/PHPUnit/System/ManyVisitorsOneWebsiteTest.php b/tests/PHPUnit/System/ManyVisitorsOneWebsiteTest.php
index 35daba0b5d..d1301d728a 100755
--- a/tests/PHPUnit/System/ManyVisitorsOneWebsiteTest.php
+++ b/tests/PHPUnit/System/ManyVisitorsOneWebsiteTest.php
@@ -115,54 +115,48 @@ class ManyVisitorsOneWebsiteTest extends SystemTestCase
)),
);
- // Randomly fails on 5.3
- if(!self::isPhpVersion53()) {
-
- $apiToTest[] = array('Live.getLastVisitsDetails', array(
- 'idSite' => $idSite,
- 'date' => $dateString,
- 'periods' => 'month',
- 'testSuffix' => '_Live.getLastVisitsDetails_sortDesc',
- 'otherRequestParameters' => array('filter_sort_order' => 'desc', 'filter_limit' => 7)
- ));
-
- // #5950
- $apiToTest[] = array('Live.getLastVisitsDetails', array(
- 'idSite' => $idSite,
- 'date' => $dateString,
- 'periods' => 'month',
- 'testSuffix' => '_Live.getLastVisitsDetails_sortByIdVisit',
- 'otherRequestParameters' => array('filter_sort_order' => 'desc', 'filter_sort_column' => 'idVisit', 'filter_limit' => 7)
- ));
-
- // #7458
- $apiToTest[] = array('Live.getLastVisitsDetails', array(
- 'idSite' => $idSite,
- 'date' => $dateString,
- 'periods' => 'month',
- 'testSuffix' => '_Live.getLastVisitsDetails_offsetAndLimit_1',
- 'otherRequestParameters' => array('filter_offset' => '1', 'filter_limit' => 3)
- ));
- $apiToTest[] = array('Live.getLastVisitsDetails', array(
- 'idSite' => $idSite,
- 'date' => $dateString,
- 'periods' => 'month',
- 'testSuffix' => '_Live.getLastVisitsDetails_offsetAndLimit_2',
- 'otherRequestParameters' => array('filter_offset' => '4', 'filter_limit' => 3)
- ));
-
- // #8324
- // testing filter_excludelowpop and filter_excludelowpop_value
- $apiToTest[] = array('UserCountry.getCountry', array(
- 'idSite' => $idSite,
- 'date' => $dateString,
- 'periods' => 'month',
- 'testSuffix' => '_getCountry_with_filter_excludelowpop',
- 'otherRequestParameters' => array('filter_excludelowpop' => 'nb_visits', 'filter_excludelowpop_value' => 5)
- ));
-
-
- }
+ $apiToTest[] = array('Live.getLastVisitsDetails', array(
+ 'idSite' => $idSite,
+ 'date' => $dateString,
+ 'periods' => 'month',
+ 'testSuffix' => '_Live.getLastVisitsDetails_sortDesc',
+ 'otherRequestParameters' => array('filter_sort_order' => 'desc', 'filter_limit' => 7)
+ ));
+
+ // #5950
+ $apiToTest[] = array('Live.getLastVisitsDetails', array(
+ 'idSite' => $idSite,
+ 'date' => $dateString,
+ 'periods' => 'month',
+ 'testSuffix' => '_Live.getLastVisitsDetails_sortByIdVisit',
+ 'otherRequestParameters' => array('filter_sort_order' => 'desc', 'filter_sort_column' => 'idVisit', 'filter_limit' => 7)
+ ));
+
+ // #7458
+ $apiToTest[] = array('Live.getLastVisitsDetails', array(
+ 'idSite' => $idSite,
+ 'date' => $dateString,
+ 'periods' => 'month',
+ 'testSuffix' => '_Live.getLastVisitsDetails_offsetAndLimit_1',
+ 'otherRequestParameters' => array('filter_offset' => '1', 'filter_limit' => 3)
+ ));
+ $apiToTest[] = array('Live.getLastVisitsDetails', array(
+ 'idSite' => $idSite,
+ 'date' => $dateString,
+ 'periods' => 'month',
+ 'testSuffix' => '_Live.getLastVisitsDetails_offsetAndLimit_2',
+ 'otherRequestParameters' => array('filter_offset' => '4', 'filter_limit' => 3)
+ ));
+
+ // #8324
+ // testing filter_excludelowpop and filter_excludelowpop_value
+ $apiToTest[] = array('UserCountry.getCountry', array(
+ 'idSite' => $idSite,
+ 'date' => $dateString,
+ 'periods' => 'month',
+ 'testSuffix' => '_getCountry_with_filter_excludelowpop',
+ 'otherRequestParameters' => array('filter_excludelowpop' => 'nb_visits', 'filter_excludelowpop_value' => 5)
+ ));
// this also fails on all PHP versions, it seems randomly.
// $apiToTest[] = array('Live.getLastVisitsDetails', array(
diff --git a/tests/PHPUnit/System/PivotByQueryParamTest.php b/tests/PHPUnit/System/PivotByQueryParamTest.php
index 099f82fcf6..f30fd5c555 100644
--- a/tests/PHPUnit/System/PivotByQueryParamTest.php
+++ b/tests/PHPUnit/System/PivotByQueryParamTest.php
@@ -198,10 +198,6 @@ class PivotByQueryParamTest extends SystemTestCase
}
public function assertApiResponseEqualsExpected($apiMethod, $queryParams)
{
- if(self::isPhpVersion53()) {
- // 5.3.3 space encoding fail eg. https://travis-ci.org/piwik/piwik/jobs/35920420
- $this->markTestSkipped();
- }
parent::assertApiResponseEqualsExpected($apiMethod, $queryParams);
}
}
diff --git a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest.php b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest.php
index 5e4c04a7d8..ae4c167010 100755
--- a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest.php
+++ b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest.php
@@ -26,9 +26,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysArchivingDisabledTest extends SystemTes
*/
public function testApi($api, $params)
{
- if (self::isPhpVersion53() && self::isTravisCI()) {
- $this->markTestSkipped("Skipping this test as it often fails on travis)");
- }
$this->runApiTests($api, $params);
}
diff --git a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysConversionsTest.php b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysConversionsTest.php
index 7e9a576b71..12cb4b15f8 100755
--- a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysConversionsTest.php
+++ b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysConversionsTest.php
@@ -38,8 +38,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysConversionsTest extends SystemTestCase
*/
public function testApi($api, $params)
{
- $this->markTestSkippedOnPhp53();
-
$this->runApiTests($api, $params);
}
@@ -126,8 +124,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysConversionsTest extends SystemTestCase
// plugins is non-trivial, so not done now.
public function test_Archive_getNumeric_ReturnsMetricsFromDifferentPlugins_WhenThoseMetricsAreRequested()
{
- $this->markTestSkippedOnPhp53();
-
// Tests that getting a visits summary metric (nb_visits) & a Goal's metric (Goal_revenue)
// at the same time works.
$dateTimeRange = '2010-01-03,2010-01-06';
@@ -149,8 +145,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysConversionsTest extends SystemTestCase
// plugins is non-trivial, so not done now.
public function test_Archive_getNumeric_shouldInvalidateRememberedReportsOncePerRequestIfNeeded()
{
- $this->markTestSkippedOnPhp53();
-
// Tests that getting a visits summary metric (nb_visits) & a Goal's metric (Goal_revenue)
// at the same time works.
$dateTimeRange = '2010-01-03,2010-01-06';
@@ -219,13 +213,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysConversionsTest extends SystemTestCase
{
return 'TwoVisitors_twoWebsites_differentDays_Conversions';
}
-
- private function markTestSkippedOnPhp53()
- {
- if (self::isPhpVersion53() && self::isTravisCI()) {
- $this->markTestSkipped("Skipping this test as it often fails on travis)");
- }
- }
}
TwoVisitorsTwoWebsitesDifferentDaysConversionsTest::$fixture = new TwoSitesTwoVisitorsDifferentDays();
diff --git a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
index 9e0d567e6b..43335c0e81 100755
--- a/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
+++ b/tests/PHPUnit/System/TwoVisitorsTwoWebsitesDifferentDaysTest.php
@@ -37,9 +37,6 @@ class TwoVisitorsTwoWebsitesDifferentDaysTest extends SystemTestCase
*/
public function testApi($api, $params)
{
- if(self::isTravisCI() && self::isPhpVersion53()) {
- $this->markTestSkipped('This test fails on travis eg. https://travis-ci.org/piwik/piwik/jobs/46944264');
- }
$this->runApiTests($api, $params);
}
diff --git a/tests/PHPUnit/Unit/UrlHelperTest.php b/tests/PHPUnit/Unit/UrlHelperTest.php
index e972d20d54..c3cd578a65 100644
--- a/tests/PHPUnit/Unit/UrlHelperTest.php
+++ b/tests/PHPUnit/Unit/UrlHelperTest.php
@@ -220,14 +220,6 @@ class UrlHelperTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('localhost', UrlHelper::getHostFromUrl('localhost/path'));
$this->assertEquals('sub.localhost', UrlHelper::getHostFromUrl('sub.localhost/path'));
$this->assertEquals('sub.localhost', UrlHelper::getHostFromUrl('http://sub.localhost/path/?query=test'));
-
- if(SystemTestCase::isPhpVersion53()) {
- //parse_url was fixed in 5,4,7
- // Fixed host recognition when scheme is omitted and a leading component separator is present.
- // http://php.net/parse_url
- return;
- }
-
$this->assertEquals('localhost', UrlHelper::getHostFromUrl('//localhost/path'));
$this->assertEquals('localhost', UrlHelper::getHostFromUrl('//localhost/path?test=test2'));
$this->assertEquals('example.org', UrlHelper::getHostFromUrl('//example.org/path'));
@@ -264,4 +256,4 @@ class UrlHelperTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('add=foo', UrlHelper::getQueryFromUrl('/', array('add' => 'foo')));
$this->assertEquals('add[]=foo&add[]=test', UrlHelper::getQueryFromUrl('/', array('add' => array('foo', 'test'))));
}
-} \ No newline at end of file
+}