ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
assJavaAppletGUITest Class Reference

Unit tests. More...

+ Inheritance diagram for assJavaAppletGUITest:
+ Collaboration diagram for assJavaAppletGUITest:

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

Member Function Documentation

assJavaAppletGUITest::setUp ( )
protected

Definition at line 15 of file assJavaAppletGUITest.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;
}
}
assJavaAppletGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 49 of file assJavaAppletGUITest.php.

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

Field Documentation

assJavaAppletGUITest::$backupGlobals = FALSE
protected

Definition at line 13 of file assJavaAppletGUITest.php.


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