diff --git a/tests/src/Kernel/Service/UserCounterTest.php b/tests/src/Kernel/Service/UserCounterTest.php new file mode 100644 index 0000000..92fa881 --- /dev/null +++ b/tests/src/Kernel/Service/UserCounterTest.php @@ -0,0 +1,50 @@ +userCounter = $this->container->get(UserCounter::class); + } + + /** @test */ + public function active_users_are_counted() { + $this->createUser(['status' => 1]); + $this->createUser(['status' => 1]); + + $this->assertEquals(2, $this->userCounter->getActiveUserCount()); + } + + /** @test */ + public function blocked_users_are_not_counted() { + $this->createUser(['status' => 1]); + $this->createUser(['status' => 0]); + + $this->assertEquals(1, $this->userCounter->getActiveUserCount()); + } + +}