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@piwik.org>2018-09-29 00:30:54 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-09-29 00:30:54 +0300
commitc90a702071b16f298b9f5628d214d5aa55793fc7 (patch)
treee4e3f3a697b3a40596bf23999b1e90d546c11184 /tests/PHPUnit/System/Utf8mb4Test.php
parentd3d7ed112a606a4e94a7665899c34329be6a175b (diff)
Replace unsupported characters in all tracking request params (#13437)
* replace unsupported characters in all tracking request params * Ensure unsupported chars are replaced in json_encoded params as well * Adds simple test for 4byte UTF8 chars
Diffstat (limited to 'tests/PHPUnit/System/Utf8mb4Test.php')
-rw-r--r--tests/PHPUnit/System/Utf8mb4Test.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/PHPUnit/System/Utf8mb4Test.php b/tests/PHPUnit/System/Utf8mb4Test.php
new file mode 100644
index 0000000000..000dafcc2f
--- /dev/null
+++ b/tests/PHPUnit/System/Utf8mb4Test.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+namespace Piwik\Tests\System;
+
+use Piwik\Common;
+use Piwik\Db;
+use Piwik\Tests\Fixtures\Utf8mb4;
+use Piwik\Tests\Framework\Fixture;
+use Piwik\Tracker\Action;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+use Piwik\Tests\Fixtures\OneVisitWithAbnormalPageviewUrls;
+
+/**
+ * Tests for tracking parameters containing 4 byte UTF8 chars.
+ *
+ * @group Core
+ * @group Utf8mb4Test
+ */
+class Utf8mb4Test extends SystemTestCase
+{
+ /** @var Utf8mb4 */
+ public static $fixture = null; // initialized below class definition
+
+ public function testApi()
+ {
+ $this->runApiTests(['Live.getLastVisitsDetails'], [
+ 'idSite' => self::$fixture->idSite,
+ 'date' => '2010-01-04',
+ 'period' => 'year'
+ ]);
+ }
+
+
+ public static function getOutputPrefix()
+ {
+ return 'Utf8mb4';
+ }
+}
+
+Utf8mb4Test::$fixture = new Utf8mb4(); \ No newline at end of file