ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
assFormulaQuestionGUITest Class Reference

Unit tests. More...

+ Inheritance diagram for assFormulaQuestionGUITest:
+ Collaboration diagram for assFormulaQuestionGUITest:

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

Member Function Documentation

assFormulaQuestionGUITest::setUp ( )
protected

Definition at line 15 of file assFormulaQuestionGUITest.php.

References $ilCtrl, and $lng.

{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
require_once './Services/UICore/classes/class.ilCtrl.php';
$ilCtrl_mock = $this->getMock('ilCtrl');
$ilCtrl_mock->expects( $this->any() )->method( 'saveParameter' );
$ilCtrl_mock->expects( $this->any() )->method( 'saveParameterByClass' );
global $ilCtrl;
$ilCtrl = $ilCtrl_mock;
require_once './Services/Language/classes/class.ilLanguage.php';
$lng_mock = $this->getMock('ilLanguage', array('txt'), array(), '', false);
//$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
global $lng;
$lng = $lng_mock;
$ilias_mock = new stdClass();
$ilias_mock->account = new stdClass();
$ilias_mock->account->id = 6;
$ilias_mock->account->fullname = 'Esther Tester';
global $ilias;
$ilias = $ilias_mock;
}
}
assFormulaQuestionGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 49 of file assFormulaQuestionGUITest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assFormulaQuestionGUI.php';
// Act
$instance = new assFormulaQuestionGUI();
$this->assertInstanceOf('assFormulaQuestionGUI', $instance);
}

Field Documentation

assFormulaQuestionGUITest::$backupGlobals = FALSE
protected

Definition at line 13 of file assFormulaQuestionGUITest.php.


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