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:
authorBen <ben.burgess@innocraft.com>2022-03-09 08:57:48 +0300
committerBen <ben.burgess@innocraft.com>2022-03-09 08:57:48 +0300
commit80c5bb44327c8cc1005f2a280c140609b78a95d4 (patch)
treef3e8c46d86a043df69269982f999774eacbc65da
parent80f266b86443bedb104672af61814b1b32f77605 (diff)
Update tests, fix for goals menu ordering issue
-rw-r--r--plugins/Goals/Pages.php6
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml100
3 files changed, 6 insertions, 102 deletions
diff --git a/plugins/Goals/Pages.php b/plugins/Goals/Pages.php
index cef5939b83..f124cc9664 100644
--- a/plugins/Goals/Pages.php
+++ b/plugins/Goals/Pages.php
@@ -277,7 +277,11 @@ class Pages
// Sort reports in each category to respect the report order property
uasort($reports, function ($a, $b) {
- return $a['order'] <=> $b['order'];
+ if (isset($a['order']) && isset($b['order'])) {
+ return $a['order'] <=> $b['order'];
+ } else {
+ return 0;
+ }
});
foreach ($reports as $report) {
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
index cb05d94315..66482770da 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryMetrics.xml
@@ -26,7 +26,7 @@
<documentation>Average time (in seconds) the browser spends loading the webpage after the response was fully received and before the user can start interacting with it.</documentation>
</row>
<row>
- <name>Avg. Time on Website</name>
+ <name>Avg. Visit Duration (in seconds)</name>
<id>avg_time_on_site</id>
<documentation>The average duration of a visit.</documentation>
</row>
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml
index 61aed71065..307b5e8712 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml
@@ -102,16 +102,6 @@
<documentation>In this report, you can see which files your visitors have downloaded. &lt;br /&gt; What Matomo counts as a download is the click on a download link. Whether the download was completed or not isn't known to Matomo.</documentation>
</row>
<row>
- <name>Entry Pages (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Entry Pages Titles (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Entry page titles (Actions)</name>
<documentation>This report contains information about the titles of entry pages that were used during the specified period. Use the plus and minus icons on the left to navigate.</documentation>
</row>
@@ -148,26 +138,6 @@
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
</row>
<row>
- <name>Goal 1 - Thank you - Entry Pages (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 1 - Thank you - Entry Pages Titles (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 1 - Thank you - Page Titles (Pages)</name>
- <documentation>Goals_PageTitlesReportDocumentation</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 1 - Thank you - Pages (Pages)</name>
- <documentation>This report shows how each page URL contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Goal 1 - Thank you - Visits to Conversion (Goals)</name>
<documentation>This report shows the number of visits made before a visitor converts a goal.</documentation>
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
@@ -178,26 +148,6 @@
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
</row>
<row>
- <name>Goal 2 - Hello - Entry Pages (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 2 - Hello - Entry Pages Titles (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 2 - Hello - Page Titles (Pages)</name>
- <documentation>Goals_PageTitlesReportDocumentation</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goal 2 - Hello - Pages (Pages)</name>
- <documentation>This report shows how each page URL contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Goal 2 - Hello - Visits to Conversion (Goals)</name>
<documentation>This report shows the number of visits made before a visitor converts a goal.</documentation>
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
@@ -233,26 +183,6 @@
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
</row>
<row>
- <name>Goals Overview - Entry Pages (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goals Overview - Entry Pages Titles (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goals Overview - Page Titles (Pages)</name>
- <documentation>Goals_PageTitlesReportDocumentation</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>Goals Overview - Pages (Pages)</name>
- <documentation>This report shows how each page URL contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Goals Overview - Visits to Conversion (Goals)</name>
<documentation>This report shows the number of visits made before a visitor converts a goal.</documentation>
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
@@ -286,11 +216,6 @@
<documentation>This report shows a hierarchical list of outlink URLs that were clicked by your visitors. An outlink is a link that leads the visitor away from your website (to another domain).&lt;br /&gt;Use the plus and minus icons on the left to navigate.</documentation>
</row>
<row>
- <name>Page Titles (Pages)</name>
- <documentation>Goals_PageTitlesReportDocumentation</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Page Titles Following a Site Search (Actions)</name>
<documentation>When visitors search on your website, they are looking for a particular page, content, product, or service. This report lists the pages that were clicked the most after an internal search. In other words, the list of pages the most searched for by visitors already on your website.&lt;br/&gt;Use the plus and minus icons on the left to navigate.</documentation>
<onlineGuideUrl>https://matomo.org/docs/site-search/</onlineGuideUrl>
@@ -304,11 +229,6 @@
<documentation>This report contains information about the titles of the pages that have been visited. &lt;br /&gt; The page title is the HTML &lt;title&gt; Tag that most browsers show in their window title.</documentation>
</row>
<row>
- <name>Pages (Pages)</name>
- <documentation>This report shows how each page URL contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>Pages Following a Site Search (Actions)</name>
<documentation>When visitors search on your website, they are looking for a particular page, content, product, or service. This report lists the pages that were clicked the most after an internal search. In other words, the list of pages the most searched for by visitors already on your website.&lt;br/&gt;Use the plus and minus icons on the left to navigate.</documentation>
<onlineGuideUrl>https://matomo.org/docs/site-search/</onlineGuideUrl>
@@ -417,26 +337,6 @@
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
</row>
<row>
- <name>triggered js - Entry Pages (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>triggered js - Entry Pages Titles (Pages)</name>
- <documentation>This report shows how each entry page contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>triggered js - Page Titles (Pages)</name>
- <documentation>Goals_PageTitlesReportDocumentation</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
- <name>triggered js - Pages (Pages)</name>
- <documentation>This report shows how each page URL contributed to goal conversions.</documentation>
- <onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>
- </row>
- <row>
<name>triggered js - Visits to Conversion (Goals)</name>
<documentation>This report shows the number of visits made before a visitor converts a goal.</documentation>
<onlineGuideUrl>https://matomo.org/docs/tracking-goals-web-analytics/</onlineGuideUrl>