summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-12-24 14:33:11 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-12-24 14:33:11 +0100
commitc023c8a9c6b7b40ee485776b516f6bec76b69919 (patch)
treeacbbbcfd7730d47e14bbae986d40b056e2090dea /tests
parentea034ecec665aff04fd74c81e11c34000a9b9492 (diff)
Metrics: Added users_force_active
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Controllers/Metrics/StatsTest.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/Unit/Controllers/Metrics/StatsTest.php b/tests/Unit/Controllers/Metrics/StatsTest.php
index 146c44a0..2c974db3 100644
--- a/tests/Unit/Controllers/Metrics/StatsTest.php
+++ b/tests/Unit/Controllers/Metrics/StatsTest.php
@@ -122,6 +122,17 @@ class StatsTest extends TestCase
}
/**
+ * @covers \Engelsystem\Controllers\Metrics\Stats::forceActiveUsers
+ */
+ public function testForceActiveUsers()
+ {
+ $this->addUsers();
+
+ $stats = new Stats($this->database);
+ $this->assertEquals(2, $stats->forceActiveUsers());
+ }
+
+ /**
* @covers \Engelsystem\Controllers\Metrics\Stats::sessions
*/
public function testSessions()
@@ -199,8 +210,8 @@ class StatsTest extends TestCase
$this->addUser(['arrived' => 1]);
$this->addUser(['arrived' => 1, 'got_voucher' => 2], ['shirt_size' => 'XXL']);
$this->addUser(['arrived' => 1, 'got_voucher' => 9]);
- $this->addUser(['arrived' => 1, 'got_voucher' => 3]);
- $this->addUser(['arrived' => 1, 'active' => 1, 'got_shirt' => true]);
+ $this->addUser(['arrived' => 1, 'got_voucher' => 3, 'force_active' => true]);
+ $this->addUser(['arrived' => 1, 'active' => 1, 'got_shirt' => true, 'force_active' => true]);
$this->addUser(['arrived' => 1, 'active' => 1, 'got_shirt' => true], ['shirt_size' => 'L']);
}