3 declare(strict_types=1);
30 protected function setUp(): void
34 $lng_mock = $this->createMock(ilLanguage::class);
35 $lng_mock->expects($this->any())
37 ->willReturnCallback(
function () {
38 return "testTranslation";
41 $ctrl_mock = $this->createMock(ilCtrl::class);
42 $ctrl_mock->expects($this->any())
43 ->method(
"getFormAction")
44 ->willReturnCallback(
function () {
45 return "testFormAction";
51 $this->
setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
52 $component_factory = $this->createMock(ilComponentFactory::class);
53 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
60 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array(
'getObject'))->getMock();
61 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->createMock(ilObjTest::class));
67 $this->assertInstanceOf(ilEvaluationAllTableGUI::class, $this->tableGui);
73 $this->parentObj_mock,
84 $this->parentObj_mock,
89 $this->assertTrue($tableGui->numericOrdering(
"reached"));
90 $this->assertTrue($tableGui->numericOrdering(
"hint_count"));
91 $this->assertTrue($tableGui->numericOrdering(
"exam_id"));
92 $this->assertTrue($tableGui->numericOrdering(
"name"));
95 $this->parentObj_mock,
100 $this->assertTrue($tableGui->numericOrdering(
"reached"));
101 $this->assertTrue($tableGui->numericOrdering(
"hint_count"));
102 $this->assertTrue($tableGui->numericOrdering(
"exam_id"));
103 $this->assertTrue($tableGui->numericOrdering(
"name"));
106 $this->parentObj_mock,
111 $this->assertTrue($tableGui->numericOrdering(
"reached"));
112 $this->assertTrue($tableGui->numericOrdering(
"hint_count"));
113 $this->assertTrue($tableGui->numericOrdering(
"exam_id"));
114 $this->assertFalse($tableGui->numericOrdering(
"name"));
121 "txt" =>
"testTranslation",
125 "txt" =>
"testTranslation",
129 "txt" =>
"testTranslation",
133 "txt" =>
"testTranslation",
137 "txt" =>
"testTranslation",
141 "txt" =>
"testTranslation",
145 "txt" =>
"testTranslation",
149 "txt" =>
"testTranslation",
155 $this->parentObj_mock,
164 $this->parentObj_mock,
170 $this->assertEquals([], $tableGui->getSelectableColumns());
176 $this->assertEquals($expected, $this->tableGui->getSelectedColumns());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testGetSelectableColumns()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlobalVariable(string $name, $value)
test_instantiateObject_shouldReturnInstance()
ilObjTestGUI $parentObj_mock
numericOrdering(string $a_field)
Should this field be sorted numeric?
ilEvaluationAllTableGUI $tableGui