19 declare(strict_types=1);
33 protected function setUp(): void
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";
48 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
49 $component_factory = $this->createMock(ilComponentFactory::class);
50 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
54 $this->parentObj_mock = $this->getMockBuilder(TestScoringByParticipantGUI::class)->disableOriginalConstructor()->onlyMethods([
'getObject'])->getMock();
55 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->
getTestObjMock());
61 $this->assertInstanceOf(TestScoringByParticipantPassesOverviewTableGUI::class, $this->tableGui);
test_instantiateObject_shouldReturnInstance()
TestScoringByParticipantGUI $parentObj_mock
setGlobalVariable(string $name, mixed $value)
TestScoringByParticipantPassesOverviewTableGUI $tableGui
Class TestScoringByParticipantPassesOverviewTableGUITest.