ILIAS  trunk Revision v11.0_alpha-1903-g97817446624
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestSkillLevelThresholdsTableGUITest Class Reference

Class ilTestSkillLevelThresholdsTableGUITest. More...

+ Inheritance diagram for ilTestSkillLevelThresholdsTableGUITest:
+ Collaboration diagram for ilTestSkillLevelThresholdsTableGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testQuestionAssignmentColumnsEnabled ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 

Private Attributes

ilTestSkillLevelThresholdsTableGUI $tableGui
 
ilObjTestGUI $parentObj_mock
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestSkillLevelThresholdsTableGUITest::setUp ( )
protected

Definition at line 30 of file ilTestSkillLevelThresholdsTableGUITest.php.

30  : void
31  {
32  parent::setUp();
33 
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";
40  });
41 
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));
50 
51  $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(['getObject'])->getMock();
52  $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->getTestObjMock());
53  $this->tableGui = new ilTestSkillLevelThresholdsTableGUI(
54  $this->parentObj_mock,
55  0,
56  "",
57  $ctrl_mock,
58  $lng_mock
59  );
60  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestSkillLevelThresholdsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 62 of file ilTestSkillLevelThresholdsTableGUITest.php.

62  : void
63  {
64  $this->assertInstanceOf(ilTestSkillLevelThresholdsTableGUI::class, $this->tableGui);
65  }

◆ testQuestionAssignmentColumnsEnabled()

ilTestSkillLevelThresholdsTableGUITest::testQuestionAssignmentColumnsEnabled ( )

Definition at line 67 of file ilTestSkillLevelThresholdsTableGUITest.php.

67  : void
68  {
69  $this->assertIsBool($this->tableGui->areQuestionAssignmentColumnsEnabled());
70  $this->tableGui->setQuestionAssignmentColumnsEnabled(false);
71  $this->assertFalse($this->tableGui->areQuestionAssignmentColumnsEnabled());
72  $this->tableGui->setQuestionAssignmentColumnsEnabled(true);
73  $this->assertTrue($this->tableGui->areQuestionAssignmentColumnsEnabled());
74  }

Field Documentation

◆ $parentObj_mock

ilObjTestGUI ilTestSkillLevelThresholdsTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilTestSkillLevelThresholdsTableGUITest.php.

◆ $tableGui

ilTestSkillLevelThresholdsTableGUI ilTestSkillLevelThresholdsTableGUITest::$tableGui
private

Definition at line 27 of file ilTestSkillLevelThresholdsTableGUITest.php.


The documentation for this class was generated from the following file: