diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-10-08 07:00:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 07:00:48 +0300 |
commit | 22809f18ca797edf48193bd2d5fe8167ab420685 (patch) | |
tree | 2d33ef07488fd3c9bffa06f4b116bfe986aa6a84 /plugins/Insights | |
parent | d0701d845fc06c83d31efd518a1cc47c88a9bf17 (diff) |
Fix error trying to round unsupported operands in custom reports (#16543)
Diffstat (limited to 'plugins/Insights')
-rw-r--r-- | plugins/Insights/tests/Integration/ApiTest.php | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/plugins/Insights/tests/Integration/ApiTest.php b/plugins/Insights/tests/Integration/ApiTest.php index 8e438ea5be..ae0bf09e4d 100644 --- a/plugins/Insights/tests/Integration/ApiTest.php +++ b/plugins/Insights/tests/Integration/ApiTest.php @@ -85,14 +85,41 @@ class ApiTest extends SystemTestCase 'minDisappearedPercent' => 2, 'lastTotalValue' => 59, 'evolutionTotal' => -15.3, - 'evolutionDifference' => -9 + 'evolutionDifference' => -9, + 'totals' => [ + 'nb_visits' => 42, + 'growth_percent' => 0, + 'growth_percent_numeric' => 354.2, + 'grown' => 0, + 'value_old' => 38, + 'value_new' => 30, + 'difference' => -8, + 'importance' => 38, + 'isDisappeared' => 0, + 'isNew' => 0, + 'isMover' => 0, + 'isMoverAndShaker' => 0, + ], + 'totalsUnformatted' => [ + 'nb_visits' => 42, + 'growth_percent' => 0, + 'growth_percent_numeric' => 354.2, + 'grown' => 0, + 'value_old' => 38, + 'value_new' => 30, + 'difference' => -8, + 'importance' => 38, + 'isDisappeared' => 0, + 'isNew' => 0, + 'isMover' => 0, + 'isMoverAndShaker' => 0, + ] ); self::assertIsArray($metadata['report']); $this->assertEquals('Actions', $metadata['report']['module']); $this->assertEquals('getPageUrls', $metadata['report']['action']); unset($metadata['report']); - unset($metadata['totals']); $this->assertEquals($expectedMetadata, $metadata); } |