ILIAS  release_8 Revision v8.24
assFlashQuestionTest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): 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 }
52
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 }
63}
Class assBaseTestCase.
setGlobalVariable(string $name, $value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...