ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestRandomQuestionSetSourcePoolDefinitionTest Class Reference

Class ilTestRandomQuestionSetSourcePoolDefinitionTest. More...

+ Inheritance diagram for ilTestRandomQuestionSetSourcePoolDefinitionTest:
+ Collaboration diagram for ilTestRandomQuestionSetSourcePoolDefinitionTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testId ()
 
 testPoolId ()
 
 testPoolTitle ()
 
 testPoolPath ()
 
 testPoolQuestionCount ()
 
 testOriginalTaxonomyFilter ()
 
 testMappedTaxonomyFilter ()
 
 testTypeFilter ()
 
 testLifecycleFilter ()
 
 testQuestionAmount ()
 
 testSequencePosition ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 

Private Attributes

ilTestRandomQuestionSetSourcePoolDefinition $testObj
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetSourcePoolDefinitionTest::setUp ( )
protected

Definition at line 29 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

29  : void
30  {
31  parent::setUp();
32 
34  $this->createMock(ilDBInterface::class),
35  $this->getTestObjMock()
36  );
37  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetSourcePoolDefinitionTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 39 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

39  : void
40  {
41  $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinition::class, $this->testObj);
42  }

◆ testId()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testId ( )

Definition at line 44 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

References $id.

44  : void
45  {
46  $id = 125;
47  $this->testObj->setId($id);
48  $this->assertEquals($id, $this->testObj->getId());
49  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ testLifecycleFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testLifecycleFilter ( )

Definition at line 110 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

110  : void
111  {
112  $expected = [
113  'test',
114  'hello',
115  'world'
116  ];
117  $this->testObj->setLifecycleFilter($expected);
118  $this->assertEquals($expected, $this->testObj->getLifecycleFilter());
119  }

◆ testMappedTaxonomyFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testMappedTaxonomyFilter ( )

Definition at line 89 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

89  : 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  }

◆ testOriginalTaxonomyFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testOriginalTaxonomyFilter ( )

Definition at line 79 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

79  : 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  }

◆ testPoolId()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolId ( )

Definition at line 51 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

51  : void
52  {
53  $poolId = 125;
54  $this->testObj->setPoolId($poolId);
55  $this->assertEquals($poolId, $this->testObj->getPoolId());
56  }

◆ testPoolPath()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolPath ( )

Definition at line 65 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

65  : void
66  {
67  $poolPath = 'test';
68  $this->testObj->setPoolPath($poolPath);
69  $this->assertEquals($poolPath, $this->testObj->getPoolPath());
70  }

◆ testPoolQuestionCount()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolQuestionCount ( )

Definition at line 72 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

72  : void
73  {
74  $poolQuestionCount = 5;
75  $this->testObj->setPoolQuestionCount($poolQuestionCount);
76  $this->assertEquals($poolQuestionCount, $this->testObj->getPoolQuestionCount());
77  }

◆ testPoolTitle()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testPoolTitle ( )

Definition at line 58 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

58  : void
59  {
60  $poolTitle = 'test';
61  $this->testObj->setPoolTitle($poolTitle);
62  $this->assertEquals($poolTitle, $this->testObj->getPoolTitle());
63  }

◆ testQuestionAmount()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testQuestionAmount ( )

Definition at line 121 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

121  : void
122  {
123  $questionAmount = 5;
124  $this->testObj->setQuestionAmount($questionAmount);
125  $this->assertEquals($questionAmount, $this->testObj->getQuestionAmount());
126  }

◆ testSequencePosition()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testSequencePosition ( )

Definition at line 128 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

128  : void
129  {
130  $sequencePosition = 5;
131  $this->testObj->setSequencePosition($sequencePosition);
132  $this->assertEquals($sequencePosition, $this->testObj->getSequencePosition());
133  }

◆ testTypeFilter()

ilTestRandomQuestionSetSourcePoolDefinitionTest::testTypeFilter ( )

Definition at line 99 of file ilTestRandomQuestionSetSourcePoolDefinitionTest.php.

99  : void
100  {
101  $expected = [
102  'test',
103  'hello',
104  'world'
105  ];
106  $this->testObj->setTypeFilter($expected);
107  $this->assertEquals($expected, $this->testObj->getTypeFilter());
108  }

Field Documentation

◆ $testObj

ilTestRandomQuestionSetSourcePoolDefinition ilTestRandomQuestionSetSourcePoolDefinitionTest::$testObj
private

The documentation for this class was generated from the following file: