ILIAS  release_8 Revision v8.23
assFlashQuestionTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assFlashQuestionTest:
+ Collaboration diagram for assFlashQuestionTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 

Protected Attributes

 $backupGlobals = false
 
- Protected Attributes inherited from assBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

Definition at line 26 of file assFlashQuestionTest.php.

Member Function Documentation

◆ setUp()

assFlashQuestionTest::setUp ( )
protected

Definition at line 30 of file assFlashQuestionTest.php.

References assBaseTestCase\getDatabaseMock(), assBaseTestCase\getGlobalTemplateMock(), assBaseTestCase\getIliasMock(), and assBaseTestCase\setGlobalVariable().

30  : void
31  {
32  chdir(dirname(__FILE__));
33  chdir('../../../');
34 
35  parent::setUp();
36 
37  require_once './Services/UICore/classes/class.ilCtrl.php';
38  $ilCtrl_mock = $this->createMock('ilCtrl');
39  $ilCtrl_mock->expects($this->any())->method('saveParameter');
40  $ilCtrl_mock->expects($this->any())->method('saveParameterByClass');
41  $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
42 
43  require_once './Services/Language/classes/class.ilLanguage.php';
44  $lng_mock = $this->createMock('ilLanguage', array('txt'), array(), '', false);
45  //$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
46  $this->setGlobalVariable('lng', $lng_mock);
47 
48  $this->setGlobalVariable('ilias', $this->getIliasMock());
49  $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
50  $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
51  }
setGlobalVariable(string $name, $value)
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

assFlashQuestionTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 53 of file assFlashQuestionTest.php.

53  : void
54  {
55  // Arrange
56  require_once './Modules/TestQuestionPool/classes/class.assFlashQuestion.php';
57 
58  // Act
59  $instance = new assFlashQuestion();
60 
61  $this->assertInstanceOf('assFlashQuestion', $instance);
62  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assFlashQuestionTest::$backupGlobals = false
protected

Definition at line 28 of file assFlashQuestionTest.php.


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