ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
assErrorTextGUITest Class Reference

Unit tests. More...

+ Inheritance diagram for assErrorTextGUITest:
+ Collaboration diagram for assErrorTextGUITest:

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

Member Function Documentation

◆ setUp()

assErrorTextGUITest::setUp ( )
protected

Definition at line 15 of file assErrorTextGUITest.php.

References $ilCtrl, $lng, array, and defined.

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 
28  require_once './Services/UICore/classes/class.ilCtrl.php';
29  $ilCtrl_mock = $this->getMock('ilCtrl');
30  $ilCtrl_mock->expects( $this->any() )->method( 'saveParameter' );
31  $ilCtrl_mock->expects( $this->any() )->method( 'saveParameterByClass' );
32  global $ilCtrl;
33  $ilCtrl = $ilCtrl_mock;
34 
35  require_once './Services/Language/classes/class.ilLanguage.php';
36  $lng_mock = $this->getMock('ilLanguage', array('txt'), array(), '', false);
37  //$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
38  global $lng;
39  $lng = $lng_mock;
40 
41  $ilias_mock = new stdClass();
42  $ilias_mock->account = new stdClass();
43  $ilias_mock->account->id = 6;
44  $ilias_mock->account->fullname = 'Esther Tester';
45  global $ilias;
46  $ilias = $ilias_mock;
47  }
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ test_instantiateObject_shouldReturnInstance()

assErrorTextGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 49 of file assErrorTextGUITest.php.

50  {
51  //$this->markTestIncomplete('Needs mock.');
52  // Arrange
53  require_once './Modules/TestQuestionPool/classes/class.assErrorTextGUI.php';
54 
55  // Act
56  $instance = new assErrorTextGUI();
57 
58  $this->assertInstanceOf('assErrorTextGUI', $instance);
59  }
The assErrorTextGUI class encapsulates the GUI representation for error text questions.

Field Documentation

◆ $backupGlobals

assErrorTextGUITest::$backupGlobals = FALSE
protected

Definition at line 13 of file assErrorTextGUITest.php.


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