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:
authorDaniel Ziegenberg <daniel@ziegenberg.at>2021-07-20 14:38:30 +0300
committerGitHub <noreply@github.com>2021-07-20 14:38:30 +0300
commit4d21dd28e56f545fcbaa3c0a306f06ab0302f8e5 (patch)
treec88672028120fdc44115daf0d641db6516c973c4 /tests/PHPUnit/System
parent78387db99ce0e0fe6d7226fd8cb40a5458c4353a (diff)
Fix exporting main metrics with a period of weeks and export format CSV (#17442)
* Fix exporting main metrics with a period of weeks and export format CSV * add regression unit tests for exporting main metrics with a period of weeks and export format CSV Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Diffstat (limited to 'tests/PHPUnit/System')
-rw-r--r--tests/PHPUnit/System/CsvExportTest.php7
-rw-r--r--tests/PHPUnit/System/expected/test_csvExport_multi__Contents.getContentNames_week.csvbin0 -> 624 bytes
-rw-r--r--tests/PHPUnit/System/expected/test_csvExport_multi__VisitsSummary.get_week.csvbin0 -> 434 bytes
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/PHPUnit/System/CsvExportTest.php b/tests/PHPUnit/System/CsvExportTest.php
index 54e23486b8..6b3da39d1d 100644
--- a/tests/PHPUnit/System/CsvExportTest.php
+++ b/tests/PHPUnit/System/CsvExportTest.php
@@ -7,6 +7,7 @@
*/
namespace Piwik\Tests\System;
+use Piwik\Date;
use Piwik\Plugins\Contents\tests\Fixtures\TwoVisitsWithContents;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
@@ -52,6 +53,12 @@ class CsvExportTest extends SystemTestCase
'language' => 'de',
'testSuffix' => '_xp1_inner1_trans-de')),
+ array($apiToCall, array('idSite' => $idSite,
+ 'date' => Date::factory($dateTime)->toString() .','. Date::factory($dateTime)->addDay(21)->toString(),
+ 'period' => 'week',
+ 'format' => 'csv',
+ 'testSuffix' => '_multi')),
+
array('Live.getLastVisitsDetails', array('idSite' => $idSite,
'date' => $dateTime,
'format' => 'csv',
diff --git a/tests/PHPUnit/System/expected/test_csvExport_multi__Contents.getContentNames_week.csv b/tests/PHPUnit/System/expected/test_csvExport_multi__Contents.getContentNames_week.csv
new file mode 100644
index 0000000000..43a7e23ff4
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_csvExport_multi__Contents.getContentNames_week.csv
Binary files differ
diff --git a/tests/PHPUnit/System/expected/test_csvExport_multi__VisitsSummary.get_week.csv b/tests/PHPUnit/System/expected/test_csvExport_multi__VisitsSummary.get_week.csv
new file mode 100644
index 0000000000..944e35021e
--- /dev/null
+++ b/tests/PHPUnit/System/expected/test_csvExport_multi__VisitsSummary.get_week.csv
Binary files differ