ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
assFlashQuestionGUITest Class Reference

Unit tests. More...

+ Inheritance diagram for assFlashQuestionGUITest:
+ Collaboration diagram for assFlashQuestionGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = false
 

Detailed Description

Unit tests.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

Definition at line 11 of file assFlashQuestionGUITest.php.

Member Function Documentation

◆ setUp()

assFlashQuestionGUITest::setUp ( )
protected

Definition at line 15 of file assFlashQuestionGUITest.php.

16 {
17 if (defined('ILIAS_PHPUNIT_CONTEXT')) {
18 include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
20 } else {
21 chdir(dirname(__FILE__));
22 chdir('../../../');
23
24 require_once './Services/UICore/classes/class.ilCtrl.php';
25 $ilCtrl_mock = $this->createMock('ilCtrl');
26 $ilCtrl_mock->expects($this->any())->method('saveParameter');
27 $ilCtrl_mock->expects($this->any())->method('saveParameterByClass');
28 global $ilCtrl;
29 $ilCtrl = $ilCtrl_mock;
30
31 require_once './Services/Language/classes/class.ilLanguage.php';
32 $lng_mock = $this->createMock('ilLanguage', array('txt'), array(), '', false);
33 $lng_mock->expects($this->once())->method('txt')->will($this->returnValue('Test'));
34 global $lng;
35 $lng = $lng_mock;
36
37 $ilias_mock = new stdClass();
38 $ilias_mock->account = new stdClass();
39 $ilias_mock->account->id = 6;
40 $ilias_mock->account->fullname = 'Esther Tester';
41 global $ilias;
42 $ilias = $ilias_mock;
43 }
44 }
global $ilCtrl
Definition: ilias.php:18
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
global $lng
Definition: privfeed.php:17

References $ilCtrl, $lng, and defined.

◆ test_instantiateObject_shouldReturnInstance()

assFlashQuestionGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 46 of file assFlashQuestionGUITest.php.

47 {
48 // Arrange
49 require_once './Modules/TestQuestionPool/classes/class.assFlashQuestionGUI.php';
50
51 // Act
52 $instance = new assFlashQuestionGUI();
53
54 $this->assertInstanceOf('assFlashQuestionGUI', $instance);
55 }
The assFlashQuestionGUI class encapsulates the GUI representation for flash questions.

Field Documentation

◆ $backupGlobals

assFlashQuestionGUITest::$backupGlobals = false
protected

Definition at line 13 of file assFlashQuestionGUITest.php.


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