ILIAS  release_8 Revision v8.24
ilTestManScoringParticipantsTableGUITest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
29
30 protected function setUp(): void
31 {
32 parent::setUp();
33
34 $lng_mock = $this->createMock(ilLanguage::class);
35 $lng_mock->expects($this->any())
36 ->method("txt")
37 ->willReturnCallback(function () {
38 return "testTranslation";
39 });
40
41 $ctrl_mock = $this->createMock(ilCtrl::class);
42 $ctrl_mock->expects($this->any())
43 ->method("getFormAction")
44 ->willReturnCallback(function () {
45 return "testFormAction";
46 });
47
48 $this->setGlobalVariable("lng", $lng_mock);
49 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
50 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
51 $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
52 $component_factory = $this->createMock(ilComponentFactory::class);
53 $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
54 $this->setGlobalVariable("component.factory", $component_factory);
55 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
56
57 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array('getObject'))->getMock();
58 $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->createMock(ilObjTest::class));
59 $this->tableGui = new ilTestManScoringParticipantsTableGUI($this->parentObj_mock, "");
60 }
61
63 {
64 $this->assertInstanceOf(ilTestManScoringParticipantsTableGUI::class, $this->tableGui);
65 }
66}
Class ilObjTestGUI.
Class ilTestBaseClass.
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...