Skip to content

Commit

Permalink
Fixing broken build after core metric change
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Nov 17, 2024
1 parent 0a186eb commit fe3f19f
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/System/Commands/MigrateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ public function testApi($api, $params)

if (in_array($api, [['Live.getLastVisitsDetails'], ['Actions.getPageUrls']]) && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
$params['testSuffix'] = '5-2a';
} elseif ($api === ['API.get'] && version_compare(Version::VERSION, '5.2.0-b6', '<')) {
$params['testSuffix'] = '5-2b6';
}

$this->runApiTests($api, $params);
Expand All @@ -169,6 +171,8 @@ public function testApi_migrated($api, $params)

if (in_array($api, [['Live.getLastVisitsDetails'], ['Actions.getPageUrls']]) && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
$params['testSuffix'] = '5-2a';
} elseif ($api === ['API.get'] && version_compare(Version::VERSION, '5.2.0-b6', '<')) {
$params['testSuffix'] = '5-2b6';
}
try {
$this->runApiTests($api, $params);
Expand Down
89 changes: 89 additions & 0 deletions tests/System/expected/test_5-2b6__API.get_day.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_uniq_visitors>2</nb_uniq_visitors>
<nb_visits>2</nb_visits>
<nb_users>0</nb_users>
<nb_actions>4</nb_actions>
<max_actions>2</max_actions>
<bounce_count>0</bounce_count>
<sum_visit_length>1265</sum_visit_length>
<nb_visits_new>2</nb_visits_new>
<nb_actions_new>4</nb_actions_new>
<nb_uniq_visitors_new>2</nb_uniq_visitors_new>
<nb_users_new>0</nb_users_new>
<max_actions_new>2</max_actions_new>
<bounce_rate_new>0%</bounce_rate_new>
<nb_actions_per_visit_new>2</nb_actions_per_visit_new>
<avg_time_on_site_new>633</avg_time_on_site_new>
<nb_visits_returning>0</nb_visits_returning>
<nb_actions_returning>0</nb_actions_returning>
<nb_uniq_visitors_returning>0</nb_uniq_visitors_returning>
<nb_users_returning>0</nb_users_returning>
<max_actions_returning>0</max_actions_returning>
<bounce_rate_returning>0%</bounce_rate_returning>
<nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
<avg_time_on_site_returning>0</avg_time_on_site_returning>
<Referrers_visitorsFromSearchEngines>0</Referrers_visitorsFromSearchEngines>
<Referrers_visitorsFromSocialNetworks>0</Referrers_visitorsFromSocialNetworks>
<Referrers_visitorsFromDirectEntry>2</Referrers_visitorsFromDirectEntry>
<Referrers_visitorsFromWebsites>0</Referrers_visitorsFromWebsites>
<Referrers_visitorsFromCampaigns>0</Referrers_visitorsFromCampaigns>
<Referrers_distinctSearchEngines>0</Referrers_distinctSearchEngines>
<Referrers_distinctSocialNetworks>0</Referrers_distinctSocialNetworks>
<Referrers_distinctKeywords>0</Referrers_distinctKeywords>
<Referrers_distinctWebsites>0</Referrers_distinctWebsites>
<Referrers_distinctWebsitesUrls>0</Referrers_distinctWebsitesUrls>
<Referrers_distinctCampaigns>0</Referrers_distinctCampaigns>
<PagePerformance_network_time>0</PagePerformance_network_time>
<PagePerformance_network_hits>0</PagePerformance_network_hits>
<PagePerformance_servery_time>0</PagePerformance_servery_time>
<PagePerformance_server_hits>0</PagePerformance_server_hits>
<PagePerformance_transfer_time>0</PagePerformance_transfer_time>
<PagePerformance_transfer_hits>0</PagePerformance_transfer_hits>
<PagePerformance_domprocessing_time>0</PagePerformance_domprocessing_time>
<PagePerformance_domprocessing_hits>0</PagePerformance_domprocessing_hits>
<PagePerformance_domcompletion_time>0</PagePerformance_domcompletion_time>
<PagePerformance_domcompletion_hits>0</PagePerformance_domcompletion_hits>
<PagePerformance_onload_time>0</PagePerformance_onload_time>
<PagePerformance_onload_hits>0</PagePerformance_onload_hits>
<PagePerformance_pageload_time>0</PagePerformance_pageload_time>
<PagePerformance_pageload_hits>0</PagePerformance_pageload_hits>
<avg_time_network>0</avg_time_network>
<avg_time_server>0</avg_time_server>
<avg_time_transfer>0</avg_time_transfer>
<avg_time_dom_processing>0</avg_time_dom_processing>
<avg_time_dom_completion>0</avg_time_dom_completion>
<avg_time_on_load>0</avg_time_on_load>
<avg_page_load_time>0</avg_page_load_time>
<nb_conversions>2</nb_conversions>
<nb_visits_converted>1</nb_visits_converted>
<revenue>2546</revenue>
<conversion_rate>50%</conversion_rate>
<nb_conversions_new_visit>2</nb_conversions_new_visit>
<nb_visits_converted_new_visit>1</nb_visits_converted_new_visit>
<revenue_new_visit>2546</revenue_new_visit>
<conversion_rate_new_visit>50%</conversion_rate_new_visit>
<nb_conversions_returning_visit>0</nb_conversions_returning_visit>
<nb_visits_converted_returning_visit>0</nb_visits_converted_returning_visit>
<revenue_returning_visit>0</revenue_returning_visit>
<conversion_rate_returning_visit>0%</conversion_rate_returning_visit>
<nb_total_overall_bandwidth>0</nb_total_overall_bandwidth>
<nb_total_pageview_bandwidth>0</nb_total_pageview_bandwidth>
<nb_total_download_bandwidth>0</nb_total_download_bandwidth>
<nb_pageviews>3</nb_pageviews>
<nb_uniq_pageviews>3</nb_uniq_pageviews>
<nb_downloads>0</nb_downloads>
<nb_uniq_downloads>0</nb_uniq_downloads>
<nb_outlinks>0</nb_outlinks>
<nb_uniq_outlinks>0</nb_uniq_outlinks>
<nb_searches>1</nb_searches>
<nb_keywords>1</nb_keywords>
<Referrers_visitorsFromDirectEntry_percent>100%</Referrers_visitorsFromDirectEntry_percent>
<Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
<Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
<Referrers_visitorsFromSocialNetworks_percent>0%</Referrers_visitorsFromSocialNetworks_percent>
<Referrers_visitorsFromWebsites_percent>0%</Referrers_visitorsFromWebsites_percent>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>2</nb_actions_per_visit>
<avg_time_on_site>633</avg_time_on_site>
</result>
83 changes: 83 additions & 0 deletions tests/System/expected/test_5-2b6__API.get_year.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_visits>2</nb_visits>
<nb_actions>4</nb_actions>
<max_actions>2</max_actions>
<bounce_count>0</bounce_count>
<sum_visit_length>1265</sum_visit_length>
<nb_visits_new>2</nb_visits_new>
<nb_actions_new>4</nb_actions_new>
<max_actions_new>2</max_actions_new>
<bounce_rate_new>0%</bounce_rate_new>
<nb_actions_per_visit_new>2</nb_actions_per_visit_new>
<avg_time_on_site_new>633</avg_time_on_site_new>
<nb_visits_returning>0</nb_visits_returning>
<nb_actions_returning>0</nb_actions_returning>
<max_actions_returning>0</max_actions_returning>
<bounce_rate_returning>0%</bounce_rate_returning>
<nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
<avg_time_on_site_returning>0</avg_time_on_site_returning>
<Referrers_visitorsFromSearchEngines>0</Referrers_visitorsFromSearchEngines>
<Referrers_visitorsFromSocialNetworks>0</Referrers_visitorsFromSocialNetworks>
<Referrers_visitorsFromDirectEntry>2</Referrers_visitorsFromDirectEntry>
<Referrers_visitorsFromWebsites>0</Referrers_visitorsFromWebsites>
<Referrers_visitorsFromCampaigns>0</Referrers_visitorsFromCampaigns>
<Referrers_distinctSearchEngines>0</Referrers_distinctSearchEngines>
<Referrers_distinctSocialNetworks>0</Referrers_distinctSocialNetworks>
<Referrers_distinctKeywords>0</Referrers_distinctKeywords>
<Referrers_distinctWebsites>0</Referrers_distinctWebsites>
<Referrers_distinctWebsitesUrls>0</Referrers_distinctWebsitesUrls>
<Referrers_distinctCampaigns>0</Referrers_distinctCampaigns>
<PagePerformance_network_time>0</PagePerformance_network_time>
<PagePerformance_network_hits>0</PagePerformance_network_hits>
<PagePerformance_servery_time>0</PagePerformance_servery_time>
<PagePerformance_server_hits>0</PagePerformance_server_hits>
<PagePerformance_transfer_time>0</PagePerformance_transfer_time>
<PagePerformance_transfer_hits>0</PagePerformance_transfer_hits>
<PagePerformance_domprocessing_time>0</PagePerformance_domprocessing_time>
<PagePerformance_domprocessing_hits>0</PagePerformance_domprocessing_hits>
<PagePerformance_domcompletion_time>0</PagePerformance_domcompletion_time>
<PagePerformance_domcompletion_hits>0</PagePerformance_domcompletion_hits>
<PagePerformance_onload_time>0</PagePerformance_onload_time>
<PagePerformance_onload_hits>0</PagePerformance_onload_hits>
<PagePerformance_pageload_time>0</PagePerformance_pageload_time>
<PagePerformance_pageload_hits>0</PagePerformance_pageload_hits>
<avg_time_network>0</avg_time_network>
<avg_time_server>0</avg_time_server>
<avg_time_transfer>0</avg_time_transfer>
<avg_time_dom_processing>0</avg_time_dom_processing>
<avg_time_dom_completion>0</avg_time_dom_completion>
<avg_time_on_load>0</avg_time_on_load>
<avg_page_load_time>0</avg_page_load_time>
<nb_conversions>2</nb_conversions>
<nb_visits_converted>1</nb_visits_converted>
<revenue>2546</revenue>
<conversion_rate>50%</conversion_rate>
<nb_conversions_new_visit>2</nb_conversions_new_visit>
<nb_visits_converted_new_visit>1</nb_visits_converted_new_visit>
<revenue_new_visit>2546</revenue_new_visit>
<conversion_rate_new_visit>50%</conversion_rate_new_visit>
<nb_conversions_returning_visit>0</nb_conversions_returning_visit>
<nb_visits_converted_returning_visit>0</nb_visits_converted_returning_visit>
<revenue_returning_visit>0</revenue_returning_visit>
<conversion_rate_returning_visit>0%</conversion_rate_returning_visit>
<nb_total_overall_bandwidth>0</nb_total_overall_bandwidth>
<nb_total_pageview_bandwidth>0</nb_total_pageview_bandwidth>
<nb_total_download_bandwidth>0</nb_total_download_bandwidth>
<nb_pageviews>3</nb_pageviews>
<nb_uniq_pageviews>3</nb_uniq_pageviews>
<nb_downloads>0</nb_downloads>
<nb_uniq_downloads>0</nb_uniq_downloads>
<nb_outlinks>0</nb_outlinks>
<nb_uniq_outlinks>0</nb_uniq_outlinks>
<nb_searches>1</nb_searches>
<nb_keywords>1</nb_keywords>
<Referrers_visitorsFromDirectEntry_percent>100%</Referrers_visitorsFromDirectEntry_percent>
<Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
<Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
<Referrers_visitorsFromSocialNetworks_percent>0%</Referrers_visitorsFromSocialNetworks_percent>
<Referrers_visitorsFromWebsites_percent>0%</Referrers_visitorsFromWebsites_percent>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>2</nb_actions_per_visit>
<avg_time_on_site>633</avg_time_on_site>
</result>
1 change: 1 addition & 0 deletions tests/System/expected/test___API.get_year.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<nb_uniq_outlinks>0</nb_uniq_outlinks>
<nb_searches>1</nb_searches>
<nb_keywords>1</nb_keywords>
<hits>4</hits>
<Referrers_visitorsFromDirectEntry_percent>100%</Referrers_visitorsFromDirectEntry_percent>
<Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
<Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
Expand Down

0 comments on commit fe3f19f

Please sign in to comment.