Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-03-10 00:39:33 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-03-10 00:39:33 +0300
commit225d0d0c326d3833223c05f8563a0a7c0bfc0e39 (patch)
treeebd40592ed29669d5cb9367c1bf4dd0b0d168e9e /plugins/Live/tests/System
parent83a24d85915f58d4b94bee3bc0113b34d6455d0a (diff)
refs #6758 request only the needed counters which will improve performance
Diffstat (limited to 'plugins/Live/tests/System')
-rw-r--r--plugins/Live/tests/System/APITest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/Live/tests/System/APITest.php b/plugins/Live/tests/System/APITest.php
index 2c85088a19..185d2d317e 100644
--- a/plugins/Live/tests/System/APITest.php
+++ b/plugins/Live/tests/System/APITest.php
@@ -70,6 +70,19 @@ class APITest extends SystemTestCase
$this->assertEquals($this->buildCounter(0, 0, 0, 0), $counters);
}
+ public function test_GetCounters_ShouldHideAllColumnsIfRequested()
+ {
+ $exampleCounter = $this->buildCounter(0, 0, 0, 0);
+ $counters = $this->api->getCounters($this->idSite, 5, false, array_keys($exampleCounter[0]));
+ $this->assertEquals(array(array()), $counters);
+ }
+
+ public function test_GetCounters_ShouldHideSomeColumnsIfRequested()
+ {
+ $counters = $this->api->getCounters($this->idSite, 20, false, array('visitsConverted', 'visitors'));
+ $this->assertEquals(array(array('visits' => 24, 'actions' => 60)), $counters);
+ }
+
private function trackSomeVisits()
{
$nowTimestamp = time();