ILIAS  release_8 Revision v8.24
AwarenessSessionRepositoryTest.php
Go to the documentation of this file.
1<?php
2
3use PHPUnit\Framework\TestCase;
4
8class AwarenessSessionRepositoryTest extends TestCase
9{
10 protected \ILIAS\Awareness\AwarenessSessionRepository $repo;
11
12 protected function setUp(): void
13 {
14 parent::setUp();
15 $this->repo = new \ILIAS\Awareness\AwarenessSessionRepository();
16 }
17
18 protected function tearDown(): void
19 {
20 }
21
22 public function testCount(): void
23 {
25 $repo->setCount(15);
26 $this->assertEquals(
27 15,
28 $repo->getCount()
29 );
30 }
31
32 public function testHighlightCount(): void
33 {
35 $repo->setHighlightCount(6);
36 $this->assertEquals(
37 6,
38 $repo->getHighlightCount()
39 );
40 }
41
42 public function testLastUpdate(): void
43 {
45 $repo->setLastUpdate(1234);
46 $this->assertEquals(
47 1234,
48 $repo->getLastUpdate()
49 );
50 }
51
52 public function testOnlineUsersTS(): void
53 {
55 $repo->setOnlineUsersTS("2022-01-01 16:00:05");
56 $this->assertEquals(
57 "2022-01-01 16:00:05",
58 $repo->getOnlineUsersTS()
59 );
60 }
61}
ILIAS Awareness AwarenessSessionRepository $repo