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

Class ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest. More...

+ Inheritance diagram for ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest:
+ Collaboration diagram for ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testGetSourcePoolDefinitionByOriginalPoolData ()
 
 testGetEmptySourcePoolDefinition ()
 

Protected Member Functions

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

Private Attributes

ilTestRandomQuestionSetSourcePoolDefinitionFactory $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()

ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest::setUp ( )
protected

Definition at line 29 of file ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 39 of file ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest.php.

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

◆ testGetEmptySourcePoolDefinition()

ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest::testGetEmptySourcePoolDefinition ( )

Definition at line 62 of file ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest.php.

62  : void
63  {
64  $this->assertInstanceOf(
65  ilTestRandomQuestionSetSourcePoolDefinition::class,
66  $this->testObj->getEmptySourcePoolDefinition()
67  );
68  }

◆ testGetSourcePoolDefinitionByOriginalPoolData()

ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest::testGetSourcePoolDefinitionByOriginalPoolData ( )

Definition at line 44 of file ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest.php.

44  : void
45  {
46  $originalPoolData = [
47  "qpl_id" => 2,
48  'qpl_ref_id' => 4711,
49  "qpl_title" => "testTitle",
50  "qpl_path" => "test/path",
51  "count" => 5
52  ];
53 
54  $result = $this->testObj->getSourcePoolDefinitionByOriginalPoolData($originalPoolData);
55  $this->assertEquals($originalPoolData["qpl_id"], $result->getPoolId());
56  $this->assertEquals($originalPoolData["qpl_ref_id"], $result->getPoolRefId());
57  $this->assertEquals($originalPoolData["qpl_title"], $result->getPoolTitle());
58  $this->assertEquals($originalPoolData["qpl_path"], $result->getPoolPath());
59  $this->assertEquals($originalPoolData["count"], $result->getPoolQuestionCount());
60  }

Field Documentation

◆ $testObj

ilTestRandomQuestionSetSourcePoolDefinitionFactory ilTestRandomQuestionSetSourcePoolDefinitionFactoryTest::$testObj
private

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