ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestRandomQuestionSetPoolDefinitionFormGUITest Class Reference

Class ilTestRandomQuestionSetPoolDefinitionFormGUITest. More...

+ Inheritance diagram for ilTestRandomQuestionSetPoolDefinitionFormGUITest:
+ Collaboration diagram for ilTestRandomQuestionSetPoolDefinitionFormGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

Protected Member Functions

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

Private Attributes

ilTestRandomQuestionSetPoolDefinitionFormGUI $formGui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 
- Data Fields inherited from ilTestBaseTestCase
const string MOCKED_METHOD_WITHOUT_OUTPUT = 'MOCKED_METHOD_WITHOUT_OUTPUT'
 
const string DYNAMIC_CLASS = 'DynamicClass'
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 
Container $backup_dic = null
 
- Static Protected Attributes inherited from ilTestBaseTestCase
static int $DYNAMIC_CLASS_COUNT = 0
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

29 : void
30 {
31 parent::setUp();
32 $ctrl_mock = $this->createMock(ilCtrl::class);
33 $lng_mock = $this->createMock(ilLanguage::class);
34
35 $this->setGlobalVariable("lng", $lng_mock);
36 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
37
38 $testRandomQuestionSetConfigGUI_mock = $this->getMockBuilder(
39 ilTestRandomQuestionSetConfigGUI::class
40 )->disableOriginalConstructor()->getMock();
41
42 $testRandomQuestionSetConfig_mock = $this->getMockBuilder(
43 ilTestRandomQuestionSetConfig::class,
44 )->disableOriginalConstructor()->getMock();
45
47 $ctrl_mock,
48 $lng_mock,
49 $this->getTestObjMock(),
50 $testRandomQuestionSetConfigGUI_mock,
51 $testRandomQuestionSetConfig_mock
52 );
53 }
setGlobalVariable(string $name, mixed $value)

References getTestObjMock(), and setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 55 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

55 : void
56 {
57 $this->assertInstanceOf(ilTestRandomQuestionSetPoolDefinitionFormGUI::class, $this->formGui);
58 }

◆ testSaveAndNewCommand()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::testSaveAndNewCommand ( )
protected

Definition at line 69 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

69 : void
70 {
71 $expected = 'testCommand';
72
73 $this->formGui->setSaveAndNewCommand($expected);
74
75 $this->assertEquals($expected, $this->formGui->getSaveAndNewCommand());
76 }

◆ testSaveCommand()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::testSaveCommand ( )
protected

Definition at line 60 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

60 : void
61 {
62 $expected = 'testCommand';
63
64 $this->formGui->setSaveCommand($expected);
65
66 $this->assertEquals($expected, $this->formGui->getSaveCommand());
67 }

Field Documentation

◆ $formGui

ilTestRandomQuestionSetPoolDefinitionFormGUI ilTestRandomQuestionSetPoolDefinitionFormGUITest::$formGui
private

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