ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
assImagemapQuestionGUITest Class Reference

Unit tests. More...

+ Inheritance diagram for assImagemapQuestionGUITest:
+ Collaboration diagram for assImagemapQuestionGUITest:

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 assImagemapQuestionGUITest.php.

Member Function Documentation

◆ setUp()

assImagemapQuestionGUITest::setUp ( )
protected

Definition at line 15 of file assImagemapQuestionGUITest.php.

References $ilCtrl, and $lng.

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

◆ test_instantiateObject_shouldReturnInstance()

assImagemapQuestionGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 52 of file assImagemapQuestionGUITest.php.

53  {
54  $this->markTestIncomplete('ilSetting / ilDB -> more mocks needed.');
55  // Arrange
56  require_once './Modules/TestQuestionPool/classes/class.assImagemapQuestionGUI.php';
57 
58  // Act
59  require_once './Services/Administration/classes/class.ilSetting.php';
60  $instance = new assImagemapQuestionGUI();
61 
62  $this->assertInstanceOf('assImagemapQuestionGUI', $instance);
63  }
Image map question GUI representation.

Field Documentation

◆ $backupGlobals

assImagemapQuestionGUITest::$backupGlobals = FALSE
protected

Definition at line 13 of file assImagemapQuestionGUITest.php.


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