ILIAS  release_8 Revision v8.24
assSingleChoiceGUITest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assSingleChoiceGUITest:
+ Collaboration diagram for assSingleChoiceGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 

Protected Attributes

 $backupGlobals = false
 
- Protected Attributes inherited from assBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests for single choice questions

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
Id
assSingleChoiceTest.php 35946 2012-08-02 21:48:44Z mbecker

Definition at line 28 of file assSingleChoiceGUITest.php.

Member Function Documentation

◆ setUp()

assSingleChoiceGUITest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 32 of file assSingleChoiceGUITest.php.

32 : void
33 {
34 parent::setUp();
35
36 $ilCtrl_mock = $this->getMockBuilder(ilCtrl::class)
37 ->disableOriginalConstructor()
38 ->getMock();
39 $ilCtrl_mock->method('saveParameter');
40 $ilCtrl_mock->method('saveParameterByClass');
41 $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
42
43 $lng_mock = $this->getMockBuilder(ilLanguage::class)
44 ->disableOriginalConstructor()
45 ->onlyMethods(['txt'])
46 ->getMock();
47 $lng_mock->method('txt')->will($this->returnValue('Test'));
48 $this->setGlobalVariable('lng', $lng_mock);
49
50 $this->setGlobalVariable('ilias', $this->getIliasMock());
51 $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
52 $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
53 }
setGlobalVariable(string $name, $value)

References assBaseTestCase\getDatabaseMock(), assBaseTestCase\getGlobalTemplateMock(), assBaseTestCase\getIliasMock(), and assBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

assSingleChoiceGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 55 of file assSingleChoiceGUITest.php.

55 : void
56 {
57 // Arrange
58 require_once './Modules/TestQuestionPool/classes/class.assSingleChoiceGUI.php';
59
60 // Act
61 $instance = new assSingleChoiceGUI();
62
63 $this->assertInstanceOf('assSingleChoiceGUI', $instance);
64 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assSingleChoiceGUITest::$backupGlobals = false
protected

Definition at line 30 of file assSingleChoiceGUITest.php.


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