Skip to content

Commit

Permalink
updates expected test files
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Nov 13, 2024
1 parent 7964187 commit 28a5599
Show file tree
Hide file tree
Showing 40 changed files with 447 additions and 424 deletions.
92 changes: 50 additions & 42 deletions plugins/MultiSites/tests/Integration/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,27 @@ public function testConstructShouldFetchSitesWithNeededColumnsAndReturnEvenSites
$this->assertSame($this->numSitesToCreate, $dashboard->getNumSites());
$this->assertEquals($lastDate, $dashboard->getLastDate());

$expectedTotals = array(
$expectedTotals = [
'nb_pageviews' => 0,
'nb_visits' => 0,
'nb_actions' => 0,
'revenue' => 0,
'hits' => 0,
);
'previous_nb_pageviews' => 0,
'previous_nb_visits' => 0,
'previous_hits' => 0,
'previous_nb_actions' => 0,
'previous_revenue' => 0,
];
$this->assertEquals($expectedTotals, $dashboard->getTotals());

$expectedSites = [
[
'label' => 'Site 1',
'nb_visits' => '0',
'nb_actions' => '0',
'nb_pageviews' => '0',
'revenue' => '$0',
'nb_visits' => 0,
'nb_actions' => 0,
'nb_pageviews' => 0,
'revenue' => 0,
'visits_evolution' => '0%',
'actions_evolution' => '0%',
'pageviews_evolution' => '0%',
Expand All @@ -86,26 +91,27 @@ public function testConstructShouldFetchSitesWithNeededColumnsAndReturnEvenSites
'periodName' => 'day',
'previousRange' => 'Wed, Dec 12',
'previous_nb_actions' => 0,
'previous_Actions_nb_pageviews' => 0,
'previous_Goal_revenue' => 0,
'previous_Goal_nb_conversions' => 0,
'visits_evolution_trend' => 0,
'actions_evolution_trend' => 0,
'pageviews_evolution_trend' => 0,
'revenue_evolution_trend' => 0,
'nb_conversions_evolution_trend' => 0,
'currencySymbol' => '$',
'hits' => '0',
'hits' => 0,
'hits_evolution' => '0%',
'hits_evolution_trend' => 0,
'previous_Actions_hits' => 0,
'previous_nb_pageviews' => 0,
'previous_hits' => 0,
'previous_revenue' => 0,
'previous_nb_conversions' => 0,
'previous_nb_actions' => 0,
],
[
'label' => 'Site 2',
'nb_visits' => '0',
'nb_actions' => '0',
'nb_pageviews' => '0',
'revenue' => '$0',
'nb_visits' => 0,
'nb_actions' => 0,
'nb_pageviews' => 0,
'revenue' => 0,
'visits_evolution' => '0%',
'actions_evolution' => '0%',
'pageviews_evolution' => '0%',
Expand All @@ -120,26 +126,27 @@ public function testConstructShouldFetchSitesWithNeededColumnsAndReturnEvenSites
'periodName' => 'day',
'previousRange' => 'Wed, Dec 12',
'previous_nb_actions' => 0,
'previous_Actions_nb_pageviews' => 0,
'previous_Goal_revenue' => 0,
'previous_Goal_nb_conversions' => 0,
'visits_evolution_trend' => 0,
'actions_evolution_trend' => 0,
'pageviews_evolution_trend' => 0,
'revenue_evolution_trend' => 0,
'nb_conversions_evolution_trend' => 0,
'currencySymbol' => '$',
'hits' => '0',
'hits' => 0,
'hits_evolution' => '0%',
'hits_evolution_trend' => 0,
'previous_Actions_hits' => 0,
'previous_nb_pageviews' => 0,
'previous_hits' => 0,
'previous_revenue' => 0,
'previous_nb_conversions' => 0,
'previous_nb_actions' => 0,
],
[
'label' => 'Site 3',
'nb_visits' => '0',
'nb_actions' => '0',
'nb_pageviews' => '0',
'revenue' => '$0',
'nb_visits' => 0,
'nb_actions' => 0,
'nb_pageviews' => 0,
'revenue' => 0,
'visits_evolution' => '0%',
'actions_evolution' => '0%',
'pageviews_evolution' => '0%',
Expand All @@ -154,19 +161,20 @@ public function testConstructShouldFetchSitesWithNeededColumnsAndReturnEvenSites
'periodName' => 'day',
'previousRange' => 'Wed, Dec 12',
'previous_nb_actions' => 0,
'previous_Actions_nb_pageviews' => 0,
'previous_Goal_revenue' => 0,
'previous_Goal_nb_conversions' => 0,
'visits_evolution_trend' => 0,
'actions_evolution_trend' => 0,
'pageviews_evolution_trend' => 0,
'revenue_evolution_trend' => 0,
'nb_conversions_evolution_trend' => 0,
'currencySymbol' => '$',
'hits' => '0',
'hits' => 0,
'hits_evolution' => '0%',
'hits_evolution_trend' => 0,
'previous_Actions_hits' => 0,
'previous_nb_pageviews' => 0,
'previous_hits' => 0,
'previous_revenue' => 0,
'previous_nb_conversions' => 0,
'previous_nb_actions' => 0,
],
];
$this->assertEquals($expectedSites, $dashboard->getSites(array(), $limit = 10));
Expand All @@ -177,13 +185,13 @@ public function testConstructShouldActuallyFindSitesWhenSeaching()
$dashboard = new Dashboard('day', '2012-12-13', false);
$this->assertSame($this->numSitesToCreate, $dashboard->getNumSites());

$expectedSites = array (
array (
$expectedSites = [
[
'label' => 'Site 2',
'nb_visits' => '0',
'nb_actions' => '0',
'nb_pageviews' => '0',
'revenue' => '$0',
'nb_visits' => 0,
'nb_actions' => 0,
'nb_pageviews' => 0,
'revenue' => 0,
'visits_evolution' => '0%',
'actions_evolution' => '0%',
'pageviews_evolution' => '0%',
Expand All @@ -197,10 +205,6 @@ public function testConstructShouldActuallyFindSitesWhenSeaching()
'previous_nb_visits' => 0,
'periodName' => 'day',
'previousRange' => 'Wed, Dec 12',
'previous_nb_actions' => 0,
'previous_Actions_nb_pageviews' => 0,
'previous_Goal_revenue' => 0,
'previous_Goal_nb_conversions' => 0,
'visits_evolution_trend' => 0,
'actions_evolution_trend' => 0,
'pageviews_evolution_trend' => 0,
Expand All @@ -210,9 +214,13 @@ public function testConstructShouldActuallyFindSitesWhenSeaching()
'hits' => 0,
'hits_evolution' => '0%',
'hits_evolution_trend' => 0,
'previous_Actions_hits' => 0,
),
);
'previous_nb_pageviews' => 0,
'previous_hits' => 0,
'previous_revenue' => 0,
'previous_nb_conversions' => 0,
'previous_nb_actions' => 0,
],
];
$dashboard->search('site 2');
$this->assertEquals($expectedSites, $dashboard->getSites(array(), $limit = 10));
$this->assertSame(1, $dashboard->getNumSites());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -92,7 +92,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -134,7 +134,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -176,7 +176,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -218,7 +218,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -260,7 +260,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -302,7 +302,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -344,7 +344,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -386,7 +386,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -428,7 +428,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -470,7 +470,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -512,7 +512,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -554,7 +554,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -596,7 +596,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down Expand Up @@ -638,7 +638,7 @@
<previous_nb_actions>0</previous_nb_actions>
<previous_nb_pageviews>0</previous_nb_pageviews>
<previous_hits>0</previous_hits>
<previous_revenue>0</previous_revenue>
<previous_revenue>$0</previous_revenue>
<previous_nb_conversions>0</previous_nb_conversions>
<previous_orders>0</previous_orders>
<previous_ecommerce_revenue>0</previous_ecommerce_revenue>
Expand Down
Loading

0 comments on commit 28a5599

Please sign in to comment.