ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
TestScoringByParticipantTableGUITest Class Reference

Class TestScoringByParticipantTableGUITest. More...

+ Inheritance diagram for TestScoringByParticipantTableGUITest:
+ Collaboration diagram for TestScoringByParticipantTableGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
- 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

TestScoringByParticipantTableGUI $tableGui
 
TestScoringByParticipantGUI $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()

TestScoringByParticipantTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 33 of file TestScoringByParticipantTableGUITest.php.

33 : void
34 {
35 parent::setUp();
36
37 $lng_mock = $this->createMock(ilLanguage::class);
38 $lng_mock->expects($this->any())
39 ->method("txt")
40 ->willReturnCallback(function () {
41 return "testTranslation";
42 });
43
44 $ctrl_mock = $this->createMock(ilCtrl::class);
45 $ctrl_mock->expects($this->any())
46 ->method("getFormAction")
47 ->willReturnCallback(function () {
48 return "testFormAction";
49 });
50
51 $access_mock = $this->createMock(ilTestAccess::class);
52 $access_mock->expects($this->exactly(1))
53 ->method("checkScoreParticipantsAccess")
54 ->willReturn(true);
55
56 $this->setGlobalVariable("lng", $lng_mock);
57 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
58 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
59 $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
60 $component_factory = $this->createMock(ilComponentFactory::class);
61 $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
62 $this->setGlobalVariable("component.factory", $component_factory);
63 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
64
65 $this->parentObj_mock = $this->getMockBuilder(TestScoringByParticipantGUI::class)
66 ->disableOriginalConstructor()
67 ->onlyMethods(['getObject', 'getTestAccess'])
68 ->getMock();
69 $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->getTestObjMock());
70 $this->parentObj_mock->expects($this->any())->method('getTestAccess')->willReturn($access_mock);
71
72 $this->tableGui = new TestScoringByParticipantTableGUI($this->parentObj_mock, []);
73 }
setGlobalVariable(string $name, mixed $value)

References getTestObjMock(), and setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

TestScoringByParticipantTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 75 of file TestScoringByParticipantTableGUITest.php.

75 : void
76 {
77 $this->assertInstanceOf(TestScoringByParticipantTableGUI::class, $this->tableGui);
78 }

Field Documentation

◆ $parentObj_mock

TestScoringByParticipantGUI TestScoringByParticipantTableGUITest::$parentObj_mock
private

Definition at line 31 of file TestScoringByParticipantTableGUITest.php.

◆ $tableGui

TestScoringByParticipantTableGUI TestScoringByParticipantTableGUITest::$tableGui
private

Definition at line 30 of file TestScoringByParticipantTableGUITest.php.


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