ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestRandomQuestionSetSourcePoolDefinitionTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
26 {
28 
29  protected function setUp(): void
30  {
31  parent::setUp();
32 
34  $this->createMock(ilDBInterface::class),
35  $this->createMock(ilObjTest::class)
36  );
37  }
38 
40  {
41  $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinition::class, $this->testObj);
42  }
43 
44  public function testId(): void
45  {
46  $this->testObj->setId(125);
47  $this->assertEquals(125, $this->testObj->getId());
48  }
49 
50  public function testPoolId(): void
51  {
52  $this->testObj->setPoolId(125);
53  $this->assertEquals(125, $this->testObj->getPoolId());
54  }
55 
56  public function testPoolTitle(): void
57  {
58  $this->testObj->setPoolTitle("test");
59  $this->assertEquals("test", $this->testObj->getPoolTitle());
60  }
61 
62  public function testPoolPath(): void
63  {
64  $this->testObj->setPoolPath("test");
65  $this->assertEquals("test", $this->testObj->getPoolPath());
66  }
67 
68  public function testPoolQuestionCount(): void
69  {
70  $this->testObj->setPoolQuestionCount(5);
71  $this->assertEquals(5, $this->testObj->getPoolQuestionCount());
72  }
73 
74  public function testOriginalTaxonomyFilter(): void
75  {
76  $expected = [
77  125 => ["nodeId" => 20],
78  17 => ["nodeId" => 3],
79  ];
80  $this->testObj->setOriginalTaxonomyFilter($expected);
81  $this->assertEquals($expected, $this->testObj->getOriginalTaxonomyFilter());
82  }
83 
84  public function testMappedTaxonomyFilter(): void
85  {
86  $expected = [
87  125 => ["nodeId" => 20],
88  17 => ["nodeId" => 3],
89  ];
90  $this->testObj->setMappedTaxonomyFilter($expected);
91  $this->assertEquals($expected, $this->testObj->getMappedTaxonomyFilter());
92  }
93 
94  public function testTypeFilter(): void
95  {
96  $expected = [
97  "test",
98  "hello",
99  "world"
100  ];
101  $this->testObj->setTypeFilter($expected);
102  $this->assertEquals($expected, $this->testObj->getTypeFilter());
103  }
104 
105  public function testLifecycleFilter(): void
106  {
107  $expected = [
108  "test",
109  "hello",
110  "world"
111  ];
112  $this->testObj->setLifecycleFilter($expected);
113  $this->assertEquals($expected, $this->testObj->getLifecycleFilter());
114  }
115 
116  public function testQuestionAmount(): void
117  {
118  $this->testObj->setQuestionAmount(5);
119  $this->assertEquals(5, $this->testObj->getQuestionAmount());
120  }
121 
122  public function testSequencePosition(): void
123  {
124  $this->testObj->setSequencePosition(5);
125  $this->assertEquals(5, $this->testObj->getSequencePosition());
126  }
127 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilTestBaseClass.