ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
TestScoringByParticipantPassesOverviewTableGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
29 {
32 
33  protected function setUp(): void
34  {
35  parent::setUp();
36 
37  $lng_mock = $this->createMock(ilLanguage::class);
38  $ctrl_mock = $this->createMock(ilCtrl::class);
39  $ctrl_mock->expects($this->any())
40  ->method("getFormAction")
41  ->willReturnCallback(function () {
42  return "testFormAction";
43  });
44 
45  $this->setGlobalVariable("lng", $lng_mock);
46  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
47  $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
48  $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
49  $component_factory = $this->createMock(ilComponentFactory::class);
50  $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
51  $this->setGlobalVariable("component.factory", $component_factory);
52  $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
53 
54  $this->parentObj_mock = $this->getMockBuilder(TestScoringByParticipantGUI::class)->disableOriginalConstructor()->onlyMethods(['getObject'])->getMock();
55  $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->getTestObjMock());
56  $this->tableGui = new TestScoringByParticipantPassesOverviewTableGUI($this->parentObj_mock, "");
57  }
58 
60  {
61  $this->assertInstanceOf(TestScoringByParticipantPassesOverviewTableGUI::class, $this->tableGui);
62  }
63 }