ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
assSingleChoiceGUITest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
14 {
15  protected $backupGlobals = false;
16 
17  protected function setUp()
18  {
19  if (defined('ILIAS_PHPUNIT_CONTEXT')) {
20  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
21  ilUnitUtil::performInitialisation();
22  } else {
23  chdir(dirname(__FILE__));
24  chdir('../../../');
25 
26  require_once './Services/UICore/classes/class.ilCtrl.php';
27  $ilCtrl_mock = $this->createMock('ilCtrl');
28  $ilCtrl_mock->expects($this->any())->method('saveParameter');
29  $ilCtrl_mock->expects($this->any())->method('saveParameterByClass');
30  global $ilCtrl;
31  $ilCtrl = $ilCtrl_mock;
32 
33  require_once './Services/Language/classes/class.ilLanguage.php';
34  $lng_mock = $this->createMock('ilLanguage', array('txt'), array(), '', false);
35  //$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
36  global $lng;
37  $lng = $lng_mock;
38 
39  $ilias_mock = new stdClass();
40  $ilias_mock->account = new stdClass();
41  $ilias_mock->account->id = 6;
42  $ilias_mock->account->fullname = 'Esther Tester';
43  global $ilias;
44  $ilias = $ilias_mock;
45  }
46  }
47 
49  {
50  // Arrange
51  require_once './Modules/TestQuestionPool/classes/class.assSingleChoiceGUI.php';
52 
53  // Act
54  $instance = new assSingleChoiceGUI();
55 
56  $this->assertInstanceOf('assSingleChoiceGUI', $instance);
57  }
58 }
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
Unit tests for single choice questions.
global $lng
Definition: privfeed.php:17
Single choice question GUI representation.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27