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

Unit tests for single choice questions. More...

+ Inheritance diagram for assMultipleChoiceGUITest:
+ Collaboration diagram for assMultipleChoiceGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Unit tests for single choice questions.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
Id:
assMultipleChoiceTest.php 35946 2012-08-02 21:48:44Z mbecker

Definition at line 13 of file assMultipleChoiceGUITest.php.

Member Function Documentation

assMultipleChoiceGUITest::setUp ( )
protected

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

Definition at line 51 of file assMultipleChoiceGUITest.php.

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

Field Documentation

assMultipleChoiceGUITest::$backupGlobals = FALSE
protected

Definition at line 15 of file assMultipleChoiceGUITest.php.


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