17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
24 require_once
'./Services/UICore/classes/class.ilCtrl.php';
25 $ilCtrl_mock = $this->createMock(
'ilCtrl');
26 $ilCtrl_mock->expects($this->any())->method(
'saveParameter');
27 $ilCtrl_mock->expects($this->any())->method(
'saveParameterByClass');
31 require_once
'./Services/Language/classes/class.ilLanguage.php';
32 $lng_mock = $this->createMock(
'ilLanguage', array(
'txt'), array(),
'',
false);
33 $lng_mock->expects($this->once())->method(
'txt')->will($this->returnValue(
'Test'));
37 $ilias_mock =
new stdClass();
38 $ilias_mock->account =
new stdClass();
39 $ilias_mock->account->id = 6;
40 $ilias_mock->account->fullname =
'Esther Tester';
54 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTestGUI.php';
61 $this->assertInstanceOf(
'assClozeTestGUI', $instance);
An exception for terminatinating execution or to throw for unit testing.
test_instantiateObject_shouldReturnInstance()
Cloze test question GUI representation.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'