Skip to content

Commit 7c5f097

Browse files
committed
skip test for older versions as numbers have changed
1 parent afa3045 commit 7c5f097

3 files changed

Lines changed: 35 additions & 2 deletions

tests/System/TwoVisitsWithCustomVariablesSegmentMatchVisitorTypeTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Piwik\Db;
1818
use Piwik\Tests\Framework\TestCase\SystemTestCase;
1919
use Piwik\Plugins\CustomVariables\tests\Fixtures\TwoVisitsWithCustomVariables;
20+
use Piwik\Version;
2021

2122
/**
2223
* Tests use of custom variable segments.
@@ -77,6 +78,10 @@ public function getApiForTesting()
7778
*/
7879
public function testCheck()
7980
{
81+
if (version_compare(Version::VERSION, '5.4.0-b3', '<')) {
82+
self::markTestSkipped('archive numbers have changed');
83+
}
84+
8085
// TODO: if we do this in archivewriter, we don't need this code
8186
$archivePurger = StaticContainer::get(ArchivePurger::class);
8287
$archivePurger->purgeInvalidatedArchivesFrom(Date::factory(self::$fixture->dateTime));
@@ -128,6 +133,10 @@ public function testCheck()
128133
*/
129134
public function test_checkArchiveRecords_shouldMergeSubtablesIntoOneRow()
130135
{
136+
if (version_compare(Version::VERSION, '5.4.0-b3', '<')) {
137+
self::markTestSkipped('archive numbers have changed');
138+
}
139+
131140
$chunk = new Chunk();
132141

133142
$tests = array(

tests/System/expected/test_twoVisitsWithCustomVariables_segmentMatchNONE__VisitsSummary.get_day.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<results>
33
<result idSite="1">
4-
<result date="2010-01-03" />
4+
<result date="2010-01-03">
5+
<nb_uniq_visitors>0</nb_uniq_visitors>
6+
<nb_users>0</nb_users>
7+
<nb_visits>0</nb_visits>
8+
<nb_actions>0</nb_actions>
9+
<nb_visits_converted>0</nb_visits_converted>
10+
<bounce_count>0</bounce_count>
11+
<sum_visit_length>0</sum_visit_length>
12+
<max_actions>0</max_actions>
13+
<bounce_rate>0%</bounce_rate>
14+
<nb_actions_per_visit>0</nb_actions_per_visit>
15+
<avg_time_on_site>0</avg_time_on_site>
16+
</result>
517
<result date="2010-01-04" />
618
<result date="2010-01-05" />
719
<result date="2010-01-06" />

tests/System/expected/test_twoVisitsWithCustomVariables_segmentMatchNONE__VisitsSummary.get_week.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<results>
33
<result idSite="1">
4-
<result date="2009-12-28,2010-01-03" />
4+
<result date="2009-12-28,2010-01-03">
5+
<nb_uniq_visitors>0</nb_uniq_visitors>
6+
<nb_users>0</nb_users>
7+
<nb_visits>0</nb_visits>
8+
<nb_actions>0</nb_actions>
9+
<nb_visits_converted>0</nb_visits_converted>
10+
<bounce_count>0</bounce_count>
11+
<sum_visit_length>0</sum_visit_length>
12+
<max_actions>0</max_actions>
13+
<bounce_rate>0%</bounce_rate>
14+
<nb_actions_per_visit>0</nb_actions_per_visit>
15+
<avg_time_on_site>0</avg_time_on_site>
16+
</result>
517
<result date="2010-01-04,2010-01-10" />
618
<result date="2010-01-11,2010-01-17" />
719
<result date="2010-01-18,2010-01-24" />

0 commit comments

Comments
 (0)