ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestRandomQuestionSetSourcePoolDefinitionTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
28 
29  protected function setUp(): void
30  {
31  parent::setUp();
32 
34  $this->createMock(ilDBInterface::class),
35  $this->getTestObjMock()
36  );
37  }
38 
40  {
41  $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinition::class, $this->testObj);
42  }
43 
44  public function testId(): void
45  {
46  $id = 125;
47  $this->testObj->setId($id);
48  $this->assertEquals($id, $this->testObj->getId());
49  }
50 
51  public function testPoolId(): void
52  {
53  $poolId = 125;
54  $this->testObj->setPoolId($poolId);
55  $this->assertEquals($poolId, $this->testObj->getPoolId());
56  }
57 
58  public function testPoolTitle(): void
59  {
60  $poolTitle = 'test';
61  $this->testObj->setPoolTitle($poolTitle);
62  $this->assertEquals($poolTitle, $this->testObj->getPoolTitle());
63  }
64 
65  public function testPoolPath(): void
66  {
67  $poolPath = 'test';
68  $this->testObj->setPoolPath($poolPath);
69  $this->assertEquals($poolPath, $this->testObj->getPoolPath());
70  }
71 
72  public function testPoolQuestionCount(): void
73  {
74  $poolQuestionCount = 5;
75  $this->testObj->setPoolQuestionCount($poolQuestionCount);
76  $this->assertEquals($poolQuestionCount, $this->testObj->getPoolQuestionCount());
77  }
78 
79  public function testOriginalTaxonomyFilter(): void
80  {
81  $expected = [
82  125 => ['nodeId' => 20],
83  17 => ['nodeId' => 3]
84  ];
85  $this->testObj->setOriginalTaxonomyFilter($expected);
86  $this->assertEquals($expected, $this->testObj->getOriginalTaxonomyFilter());
87  }
88 
89  public function testMappedTaxonomyFilter(): void
90  {
91  $expected = [
92  125 => ['nodeId' => 20],
93  17 => ['nodeId' => 3]
94  ];
95  $this->testObj->setMappedTaxonomyFilter($expected);
96  $this->assertEquals($expected, $this->testObj->getMappedTaxonomyFilter());
97  }
98 
99  public function testTypeFilter(): void
100  {
101  $expected = [
102  'test',
103  'hello',
104  'world'
105  ];
106  $this->testObj->setTypeFilter($expected);
107  $this->assertEquals($expected, $this->testObj->getTypeFilter());
108  }
109 
110  public function testLifecycleFilter(): void
111  {
112  $expected = [
113  'test',
114  'hello',
115  'world'
116  ];
117  $this->testObj->setLifecycleFilter($expected);
118  $this->assertEquals($expected, $this->testObj->getLifecycleFilter());
119  }
120 
121  public function testQuestionAmount(): void
122  {
123  $questionAmount = 5;
124  $this->testObj->setQuestionAmount($questionAmount);
125  $this->assertEquals($questionAmount, $this->testObj->getQuestionAmount());
126  }
127 
128  public function testSequencePosition(): void
129  {
130  $sequencePosition = 5;
131  $this->testObj->setSequencePosition($sequencePosition);
132  $this->assertEquals($sequencePosition, $this->testObj->getSequencePosition());
133  }
134 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23