ILIAS  release_8 Revision v8.24
ilTestRandomQuestionSetPoolDefinitionFormGUITest Class Reference

Class ilTestRandomQuestionSetPoolDefinitionFormGUITest. More...

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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 

Protected Member Functions

 setUp ()
 
 testSaveCommand ()
 
 testSaveAndNewCommand ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Private Attributes

 $ctrl_mock
 
 $lng_mock
 
 $formGui
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 41 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

41 : void
42 {
43 parent::setUp();
44 $this->ctrl_mock = $this->createMock(ilCtrl::class);
45 $this->lng_mock = $this->createMock(ilLanguage::class);
46
47 $this->setGlobalVariable("lng", $this->lng_mock);
48 $this->setGlobalVariable("ilCtrl", $this->ctrl_mock);
49
50 $objTest_mock = $this->createMock(ilObjTest::class);
51 $testRandomQuestionSetConfigGUI_mock = $this->getMockBuilder(
52 ilTestRandomQuestionSetConfigGUI::class
53 )->disableOriginalConstructor()->getMock();
54
55 $testRandomQuestionSetConfig_mock = $this->getMockBuilder(
56 ilTestRandomQuestionSetConfig::class,
57 )->disableOriginalConstructor()->getMock();
58
60 $this->ctrl_mock,
61 $this->lng_mock,
62 $objTest_mock,
63 $testRandomQuestionSetConfigGUI_mock,
64 $testRandomQuestionSetConfig_mock
65 );
66 }
setGlobalVariable(string $name, $value)

References ilTestBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 68 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

68 : void
69 {
70 $this->assertInstanceOf(ilTestRandomQuestionSetPoolDefinitionFormGUI::class, $this->formGui);
71 }

◆ testSaveAndNewCommand()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::testSaveAndNewCommand ( )
protected

Definition at line 82 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

82 : void
83 {
84 $expected = "testCommand";
85
86 $this->formGui->setSaveAndNewCommand($expected);
87
88 $this->assertEquals($expected, $this->formGui->getSaveAndNewCommand());
89 }

◆ testSaveCommand()

ilTestRandomQuestionSetPoolDefinitionFormGUITest::testSaveCommand ( )
protected

Definition at line 73 of file ilTestRandomQuestionSetPoolDefinitionFormGUITest.php.

73 : void
74 {
75 $expected = "testCommand";
76
77 $this->formGui->setSaveCommand($expected);
78
79 $this->assertEquals($expected, $this->formGui->getSaveCommand());
80 }

Field Documentation

◆ $ctrl_mock

ilTestRandomQuestionSetPoolDefinitionFormGUITest::$ctrl_mock
private

◆ $formGui

ilTestRandomQuestionSetPoolDefinitionFormGUITest::$formGui
private

◆ $lng_mock

ilTestRandomQuestionSetPoolDefinitionFormGUITest::$lng_mock
private

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