18 declare(strict_types=1);
29 protected function setUp(): void
33 $lng_mock = $this->createMock(ilLanguage::class);
34 $ctrl_mock = $this->createMock(ilCtrl::class);
35 $ctrl_mock->expects($this->any())
36 ->method(
"getFormAction")
37 ->willReturnCallback(
function () {
38 return "testFormAction";
44 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
45 $component_factory = $this->createMock(ilComponentFactory::class);
46 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
50 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array(
'getObject'))->getMock();
51 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->createMock(ilObjTest::class));
57 $this->assertInstanceOf(ilTestHistoryTableGUI::class, $this->tableGui);
ilObjTestGUI $parentObj_mock
setGlobalVariable(string $name, $value)
test_instantiateObject_shouldReturnInstance()
ilTestHistoryTableGUI $tableGui
Class ilTestHistoryTableGUITest.