ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
BadgeManagementSessionRepositoryTest.php
Go to the documentation of this file.
1 <?php
2 
20 
22 {
24 
25  protected function setUp(): void
26  {
27  parent::setUp();
28  $this->repo = new ilBadgeManagementSessionRepository();
29  $this->repo->clear();
30  }
31 
32  protected function tearDown(): void
33  {
34  }
35 
36  public function testClear(): void
37  {
38  $repo = $this->repo;
39  $repo->setBadgeIds([1,3,4]);
40  $repo->clear();
41  $this->assertEquals(
42  [],
43  $repo->getBadgeIds()
44  );
45  }
46 
47  public function testBadgeIds(): void
48  {
49  $repo = $this->repo;
50  $repo->setBadgeIds([1,6,7]);
51  $this->assertEquals(
52  [1,6,7],
53  $repo->getBadgeIds()
54  );
55  }
56 }