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:
authorStefan Giehl <stefan@matomo.org>2019-03-11 07:47:27 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-03-11 07:47:27 +0300
commita345c2f22b8356dd3300d66f5ade3df24f69d900 (patch)
tree436cc2e01ae503fd5fa8be6720f73f8260d09a83
parentf7b442a9ca40466fe43e0312e013f51f2e5e5abd (diff)
Run AllTests against PHP 7.3 on travis (#14148)
* Run AllTests against PHP 7.3 on travis * use INTL_IDNA_VARIANT_UTS46 for idn_to_utf8 PHP 7.2 deprecated INTL_IDNA_VARIANT_2003 but still uses it as default until 7.4 * Fix test as var_export signature for stdClasses changed in PHP 7.3 see https://github.com/php/php-src/commit/e4e9cd835550990a6b8df7c61d59b6cc0da9b5b2
-rw-r--r--.travis.yml4
-rw-r--r--plugins/API/tests/Unit/HtmlRendererTest.php7
-rw-r--r--tests/PHPUnit/Integration/EmailValidatorTest.php4
3 files changed, 9 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index d78e98f8b4..adccfa91c9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -63,10 +63,10 @@ matrix:
sudo: false
addons: false
# All tests after another
- - php: 7
+ - php: 7.3
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-first-half-only"
sudo: required
- - php: 7
+ - php: 7.3
env: TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI ALLTEST_EXTRA_OPTIONS="--run-second-half-only"
sudo: required
# UITests use a specific version because the default 5.5 (== 5.5.38) is missing FreeType support
diff --git a/plugins/API/tests/Unit/HtmlRendererTest.php b/plugins/API/tests/Unit/HtmlRendererTest.php
index d1370432ff..098f9395cc 100644
--- a/plugins/API/tests/Unit/HtmlRendererTest.php
+++ b/plugins/API/tests/Unit/HtmlRendererTest.php
@@ -275,6 +275,10 @@ message', $response);
$response = $this->builder->renderDataTable($dataTable);
+ $stdClass = version_compare(PHP_VERSION, 7.3, '>=') ?
+ "(object) array(\n )," :
+ "stdClass::__set_state(array(\n )),";
+
$this->assertEquals('<table id="MultiSites_getAll" border="1">
<thead>
<tr>
@@ -292,8 +296,7 @@ message', $response);
Piwik\Plugins\CoreHome\Columns\Metrics\AverageTimeOnSite::__set_state(array(
)),
1 =&gt;
- stdClass::__set_state(array(
- )),
+ ' . $stdClass . '
2 =&gt;
Piwik\Date::__set_state(array(
\'timestamp\' =&gt; 1451606400,
diff --git a/tests/PHPUnit/Integration/EmailValidatorTest.php b/tests/PHPUnit/Integration/EmailValidatorTest.php
index 8cb0c198c0..4a4665f2d6 100644
--- a/tests/PHPUnit/Integration/EmailValidatorTest.php
+++ b/tests/PHPUnit/Integration/EmailValidatorTest.php
@@ -60,7 +60,7 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase
if (strpos(mb_strtolower($tld), 'xn--') !== 0) {
$tld = mb_strtolower($tld);
}
- $domainNameExtension = idn_to_utf8($tld);
+ $domainNameExtension = idn_to_utf8($tld, 0, INTL_IDNA_VARIANT_UTS46);
$email = 'test@example.' . $domainNameExtension;
if(!$this->isValid($email)) {
@@ -101,7 +101,7 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase
$tld = mb_strtolower($tld);
}
$this->assertFalse(
- $this->isValid('test@example.' . idn_to_utf8($tld))
+ $this->isValid('test@example.' . idn_to_utf8($tld, 0, INTL_IDNA_VARIANT_UTS46))
);
}
}