diff --git a/tests/System/TwoVisitsWithCustomVariablesSegmentContainsTest.php b/tests/System/TwoVisitsWithCustomVariablesSegmentContainsTest.php
index 1095c96..fd673a0 100644
--- a/tests/System/TwoVisitsWithCustomVariablesSegmentContainsTest.php
+++ b/tests/System/TwoVisitsWithCustomVariablesSegmentContainsTest.php
@@ -51,26 +51,36 @@ public function getApiForTesting()
$api[] = 'Actions.getPageTitles';
}
+ $olderThanMatomo5110b1 = version_compare(Version::VERSION, '5.11.0-b1', '<');
+
$segmentsToTest = [
// array( SegmentString , TestSuffix , Array of API to test)
["pageTitle=@*_)%", '_SegmentPageTitleContainsStrangeCharacters', ['VisitsSummary.get']],
- ["pageUrl=@user/profile", '_SegmentPageUrlContains', $api],
- ["pageTitle=@Profile pa", '_SegmentPageTitleContains', $api],
["pageUrl!@user/profile", '_SegmentPageUrlExcludes', $api],
["pageTitle!@Profile pa", '_SegmentPageTitleExcludes', $api],
];
+ if (version_compare(Version::VERSION, '4.13.1-rc1', '>=')) {
+ $segmentsToTest[] = ["pageUrl=@user/profile", '_SegmentPageUrlContains', ['VisitsSummary.get', 'Actions.getPageTitles']];
+ $segmentsToTest[] = ["pageUrl=@user/profile", '_SegmentPageUrlContains' . ($olderThanMatomo5110b1 ? '_old' : ''), ['Actions.getPageUrls']];
+ $segmentsToTest[] = ["pageTitle=@Profile pa", '_SegmentPageTitleContains', ['VisitsSummary.get', 'Actions.getPageTitles']];
+ $segmentsToTest[] = ["pageTitle=@Profile pa", '_SegmentPageTitleContains' . ($olderThanMatomo5110b1 ? '_old' : ''), ['Actions.getPageUrls']];
+ } else {
+ $segmentsToTest[] = ["pageUrl=@user/profile", '_SegmentPageUrlContains', $api];
+ $segmentsToTest[] = ["pageTitle=@Profile pa", '_SegmentPageTitleContains', $api];
+ }
+
if (version_compare(Version::VERSION, '4.13.1-rc1', '>=')) {
// goals for pages reports had been changed in 4.13.1, so we don't perform this tests before
$segmentsToTest[] = ["pageTitle=@*_)%", '_SegmentPageTitleContainsStrangeCharacters', ['Actions.getPageTitles']];
// starts with
- $segmentsToTest[] = ['pageUrl=^example.org/home', '_SegmentPageUrlStartsWith', ['Actions.getPageUrls']];
+ $segmentsToTest[] = ['pageUrl=^example.org/home', '_SegmentPageUrlStartsWith' . ($olderThanMatomo5110b1 ? '_old' : ''), ['Actions.getPageUrls']];
$segmentsToTest[] = ['pageTitle=^Profile pa', '_SegmentPageTitleStartsWith', ['Actions.getPageTitles']];
// ends with
- $segmentsToTest[] = ['pageUrl=$er/profile', '_SegmentPageUrlEndsWith', ['Actions.getPageUrls']];
+ $segmentsToTest[] = ['pageUrl=$er/profile', '_SegmentPageUrlEndsWith' . ($olderThanMatomo5110b1 ? '_old' : ''), ['Actions.getPageUrls']];
$segmentsToTest[] = ['pageTitle=$page', '_SegmentPageTitleEndsWith', ['Actions.getPageTitles']];
}
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains__Actions.getPageUrls_day.xml
index 2dae6b2..51f21a8 100644
--- a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains__Actions.getPageUrls_day.xml
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains__Actions.getPageUrls_day.xml
@@ -97,7 +97,7 @@
0
3
0.6666
- 0
+ 1
2
0
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains_old__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains_old__Actions.getPageUrls_day.xml
new file mode 100644
index 0000000..2dae6b2
--- /dev/null
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageTitleContains_old__Actions.getPageUrls_day.xml
@@ -0,0 +1,113 @@
+
+
+
+
+ 1
+ 1
+ 1
+ 360
+ 0
+ 0
+
+
+ 1
+ 1
+ 3
+ 364
+ 0
+
+
+ 1
+ 0
+ 3
+ 0.3333
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 0
+ 0
+ 360
+ 0%
+ 0%
+ http://example.org/homepage
+ pageUrl==http%253A%252F%252Fexample.org%252Fhomepage
+
+
+
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 1
+ 2
+ 0
+
+
+ 0
+ 0
+ 0
+ 0%
+ 100%
+ pageUrl=^http%253A%252F%252Fpiwik.net%252Fuser
+
+
+
+ 1
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 0
+ 2
+ 0
+
+
+ 0
+ 0%
+ 100%
+ http://example.org/user/profile
+ pageUrl==http%253A%252F%252Fexample.org%252Fuser%252Fprofile
+
+
+
+
\ No newline at end of file
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains__Actions.getPageUrls_day.xml
index 2dae6b2..51f21a8 100644
--- a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains__Actions.getPageUrls_day.xml
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains__Actions.getPageUrls_day.xml
@@ -97,7 +97,7 @@
0
3
0.6666
- 0
+ 1
2
0
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains_old__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains_old__Actions.getPageUrls_day.xml
new file mode 100644
index 0000000..2dae6b2
--- /dev/null
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlContains_old__Actions.getPageUrls_day.xml
@@ -0,0 +1,113 @@
+
+
+
+
+ 1
+ 1
+ 1
+ 360
+ 0
+ 0
+
+
+ 1
+ 1
+ 3
+ 364
+ 0
+
+
+ 1
+ 0
+ 3
+ 0.3333
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 0
+ 0
+ 360
+ 0%
+ 0%
+ http://example.org/homepage
+ pageUrl==http%253A%252F%252Fexample.org%252Fhomepage
+
+
+
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 1
+ 2
+ 0
+
+
+ 0
+ 0
+ 0
+ 0%
+ 100%
+ pageUrl=^http%253A%252F%252Fpiwik.net%252Fuser
+
+
+
+ 1
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 0
+ 2
+ 0
+
+
+ 0
+ 0%
+ 100%
+ http://example.org/user/profile
+ pageUrl==http%253A%252F%252Fexample.org%252Fuser%252Fprofile
+
+
+
+
\ No newline at end of file
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith__Actions.getPageUrls_day.xml
index 2dae6b2..51f21a8 100644
--- a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith__Actions.getPageUrls_day.xml
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith__Actions.getPageUrls_day.xml
@@ -97,7 +97,7 @@
0
3
0.6666
- 0
+ 1
2
0
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith_old__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith_old__Actions.getPageUrls_day.xml
new file mode 100644
index 0000000..2dae6b2
--- /dev/null
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlEndsWith_old__Actions.getPageUrls_day.xml
@@ -0,0 +1,113 @@
+
+
+
+
+ 1
+ 1
+ 1
+ 360
+ 0
+ 0
+
+
+ 1
+ 1
+ 3
+ 364
+ 0
+
+
+ 1
+ 0
+ 3
+ 0.3333
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+ 0
+ 0
+ 360
+ 0%
+ 0%
+ http://example.org/homepage
+ pageUrl==http%253A%252F%252Fexample.org%252Fhomepage
+
+
+
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 1
+ 2
+ 0
+
+
+ 0
+ 0
+ 0
+ 0%
+ 100%
+ pageUrl=^http%253A%252F%252Fpiwik.net%252Fuser
+
+
+
+ 1
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 0
+ 2
+ 0
+
+
+ 0
+ 0%
+ 100%
+ http://example.org/user/profile
+ pageUrl==http%253A%252F%252Fexample.org%252Fuser%252Fprofile
+
+
+
+
\ No newline at end of file
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith__Actions.getPageUrls_day.xml
index f873185..1f23669 100644
--- a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith__Actions.getPageUrls_day.xml
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith__Actions.getPageUrls_day.xml
@@ -99,7 +99,7 @@
0
3
0.6666
- 0
+ 1
2
0
diff --git a/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith_old__Actions.getPageUrls_day.xml b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith_old__Actions.getPageUrls_day.xml
new file mode 100644
index 0000000..f873185
--- /dev/null
+++ b/tests/System/expected/test_twoVisitsWithCustomVariables_SegmentPageUrlStartsWith_old__Actions.getPageUrls_day.xml
@@ -0,0 +1,115 @@
+
+
+
+
+ 2
+ 2
+ 2
+ 360
+ 0
+ 0
+
+
+ 2
+ 2
+ 4
+ 725
+ 1
+ 1
+ 1
+
+
+ 1
+ 0
+ 3
+ 0.3333
+ 0.5
+ 1
+ 0
+ 1000
+ 1
+ 500
+ 2
+
+
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0.5
+ 0
+ 1
+
+
+ 0
+ 0
+ 180
+ 50%
+ 50%
+ http://example.org/homepage
+ pageUrl==http%253A%252F%252Fexample.org%252Fhomepage
+
+
+
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 1
+ 2
+ 0
+
+
+ 0
+ 0
+ 0
+ 0%
+ 100%
+ pageUrl=^http%253A%252F%252Fpiwik.net%252Fuser
+
+
+
+ 1
+ 1
+ 2
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+
+
+ 2
+ 0
+ 3
+ 0.6666
+ 0
+ 2
+ 0
+
+
+ 0
+ 0%
+ 100%
+ http://example.org/user/profile
+ pageUrl==http%253A%252F%252Fexample.org%252Fuser%252Fprofile
+
+
+
+
\ No newline at end of file