ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assFileUploadTest.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 $this->setGlobalVariable('resource_storage', $this->getIRSSMock());
51 $this->setGlobalVariable('file_delivery', $this->getFileDelivery());
52 }
53
55 {
56 $instance = new assFileUpload();
57
58 $this->assertInstanceOf(assFileUpload::class, $instance);
59 }
60}
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
test_instantiateObject_shouldReturnInstance()
Class for file upload questions.
setGlobalVariable(string $name, mixed $value)