ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assTextQuestionTest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): void
31 {
32 parent::setUp();
33
34 $ilCtrl_mock = $this->getMockBuilder(ilCtrl::class)
35 ->disableOriginalConstructor()
36 ->getMock();
37 $ilCtrl_mock->method('saveParameter');
38 $ilCtrl_mock->method('saveParameterByClass');
39 $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
40
41 $lng_mock = $this->getMockBuilder(ilLanguage::class)
42 ->disableOriginalConstructor()
43 ->onlyMethods(['txt'])
44 ->getMock();
45 $lng_mock->method('txt')->willReturn('Test');
46 $this->setGlobalVariable('lng', $lng_mock);
47
48 $this->setGlobalVariable('ilias', $this->getIliasMock());
49 $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
50 }
51
53 {
54 $instance = new assTextQuestion();
55
56 $this->assertInstanceOf(assTextQuestion::class, $instance);
57 }
58}
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class for text questions.
setGlobalVariable(string $name, mixed $value)