Class ilResultsByQuestionTableGUITest.
More...
◆ setUp()
ilResultsByQuestionTableGUITest::setUp |
( |
| ) |
|
|
protected |
Definition at line 30 of file ilResultsByQuestionTableGUITest.php.
34 $lng_mock = $this->createMock(ilLanguage::class);
35 $ctrl_mock = $this->createMock(ilCtrl::class);
36 $ctrl_mock->expects($this->any())
37 ->method(
"getFormAction")
38 ->willReturnCallback(
function () {
39 return "testFormAction";
42 $this->setGlobalVariable(
"lng", $lng_mock);
43 $this->setGlobalVariable(
"ilCtrl", $ctrl_mock);
44 $this->setGlobalVariable(
"tpl", $this->createMock(ilGlobalPageTemplate::class));
45 $this->setGlobalVariable(
"component.repository", $this->createMock(ilComponentRepository::class));
46 $component_factory = $this->createMock(ilComponentFactory::class);
47 $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
48 $this->setGlobalVariable(
"component.factory", $component_factory);
49 $this->setGlobalVariable(
"ilDB", $this->createMock(ilDBInterface::class));
51 $this->parentObj_mock = $this->getMockBuilder(ilTestEvaluationGUI::class)->disableOriginalConstructor()->onlyMethods([
'getObject'])->getMock();
52 $this->parentObj_mock->expects($this->any())->method(
'getObject')->willReturn($this->getTestObjMock());
TableGUI class for results by question.
◆ test_instantiateObject_shouldReturnInstance()
ilResultsByQuestionTableGUITest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
◆ testNumericOrdering()
ilResultsByQuestionTableGUITest::testNumericOrdering |
( |
| ) |
|
Definition at line 61 of file ilResultsByQuestionTableGUITest.php.
63 $this->assertTrue($this->tableGui->numericOrdering(
"qid"));
64 $this->assertTrue($this->tableGui->numericOrdering(
"number_of_answers"));
65 $this->assertFalse($this->tableGui->numericOrdering(
"randomString"));
◆ $parentObj_mock
◆ $tableGui
The documentation for this class was generated from the following file: