ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilTestSkillLevelThresholdsTableGUITest Class Reference

Class ilTestSkillLevelThresholdsTableGUITest. More...

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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testQuestionAssignmentColumnsEnabled ()
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

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=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 
- Data Fields inherited from ilTestBaseTestCase
const string MOCKED_METHOD_WITHOUT_OUTPUT = 'MOCKED_METHOD_WITHOUT_OUTPUT'
 
const string DYNAMIC_CLASS = 'DynamicClass'
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 
Container $backup_dic = null
 
- Static Protected Attributes inherited from ilTestBaseTestCase
static int $DYNAMIC_CLASS_COUNT = 0
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTestSkillLevelThresholdsTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 30 of file ilTestSkillLevelThresholdsTableGUITest.php.

30 : void
31 {
33
34 $lng_mock = $this->createMock(ilLanguage::class);
35 $ctrl_mock = $this->createMock(ilCtrl::class);
36 $ctrl_mock->method("getFormAction")
37 ->willReturnCallback(function () {
38 return "testFormAction";
39 });
40
41 $this->setGlobalVariable("lng", $lng_mock);
42 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
43 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
44 $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
45 $component_factory = $this->createMock(ilComponentFactory::class);
46 $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
47 $this->setGlobalVariable("component.factory", $component_factory);
48 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
49
50 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(['getObject'])->getMock();
51 $this->parentObj_mock->method('getObject')->willReturn($this->getTestObjMock());
52 $this->tableGui = new ilTestSkillLevelThresholdsTableGUI(
53 $this->parentObj_mock,
54 0,
55 "",
56 $ctrl_mock,
57 $lng_mock
58 );
59 }
setGlobalVariable(string $name, mixed $value)

References getTestObjMock(), setGlobalVariable(), and setUp().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestSkillLevelThresholdsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 61 of file ilTestSkillLevelThresholdsTableGUITest.php.

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

◆ testQuestionAssignmentColumnsEnabled()

ilTestSkillLevelThresholdsTableGUITest::testQuestionAssignmentColumnsEnabled ( )

Definition at line 66 of file ilTestSkillLevelThresholdsTableGUITest.php.

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

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: