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

Class ilTestServiceGUITest. More...

+ Inheritance diagram for ilTestServiceGUITest:
+ Collaboration diagram for ilTestServiceGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testContextResultPresentation ()
 
 testParticipantData ()
 
 testObjectiveOrientedContainer ()
 
 testBuildFixedShufflerSeed (int $question_id, int $pass_id, int $active_id, int $return)
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

Static Public Member Functions

static buildFixedShufflerSeedDataProvider ()
 
- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 

Protected Member Functions

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

Private Attributes

ilTestServiceGUI $testObj
 

Additional Inherited Members

- 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

◆ buildFixedShufflerSeedDataProvider()

static ilTestServiceGUITest::buildFixedShufflerSeedDataProvider ( )
static

Definition at line 83 of file ilTestServiceGUITest.php.

83 : array
84 {
85 return [
86 [
87 'question_id' => 1,
88 'pass_id' => 1,
89 'active_id' => 1,
90 'return' => 10000004
91 ],
92 [
93 'question_id' => 9999999,
94 'pass_id' => 1,
95 'active_id' => 1,
96 'return' => 10000000
97 ],
98 [
99 'question_id' => 234342342342342334,
100 'pass_id' => 11,
101 'active_id' => 1634545234234232344,
102 'return' => 1634545234234232355
103 ],
104 [
105 'question_id' => 23434234,
106 'pass_id' => 11,
107 'active_id' => 9223372036854775804,
108 'return' => 9223372036854775804
109 ]
110 ];
111 }

◆ setUp()

ilTestServiceGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilTestServiceGUITest.php.

29 : void
30 {
31 parent::setUp();
32
33 $this->addGlobal_ilTabs();
35 $this->addGlobal_ilHelp();
36 $this->addGlobal_rbacsystem();
37 $this->addGlobal_ilSetting();
38 $this->addGlobal_ilToolbar();
41
42 $this->testObj = new ilTestServiceGUI($this->getTestObjMock());
43 }
Service GUI class for tests.
addGlobal_ilNavigationHistory()
addGlobal_GlobalScreenService()
addGlobal_ilObjDataCache()
addGlobal_rbacsystem()

References addGlobal_GlobalScreenService(), addGlobal_ilHelp(), addGlobal_ilNavigationHistory(), addGlobal_ilObjDataCache(), addGlobal_ilSetting(), addGlobal_ilTabs(), addGlobal_ilToolbar(), addGlobal_rbacsystem(), and getTestObjMock().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestServiceGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 45 of file ilTestServiceGUITest.php.

45 : void
46 {
47 $this->assertInstanceOf(ilTestServiceGUI::class, $this->testObj);
48 }

◆ testBuildFixedShufflerSeed()

ilTestServiceGUITest::testBuildFixedShufflerSeed ( int  $question_id,
int  $pass_id,
int  $active_id,
int  $return 
)

Definition at line 74 of file ilTestServiceGUITest.php.

74 : void
75 {
76 $reflection = new ReflectionClass(ilTestShuffler::class);
77 $method = $reflection->getMethod('buildFixedShufflerSeed');
78 $ilTestShuffler = new ilTestShuffler($this->createMock(ILIAS\Refinery\Factory::class));
79
80 $this->assertEquals($return, $method->invoke($ilTestShuffler, $question_id, $pass_id, $active_id));
81 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

◆ testContextResultPresentation()

ilTestServiceGUITest::testContextResultPresentation ( )

Definition at line 50 of file ilTestServiceGUITest.php.

50 : void
51 {
52 $this->testObj->setContextResultPresentation(false);
53 $this->assertFalse($this->testObj->isContextResultPresentation());
54
55 $this->testObj->setContextResultPresentation(true);
56 $this->assertTrue($this->testObj->isContextResultPresentation());
57 }

◆ testObjectiveOrientedContainer()

ilTestServiceGUITest::testObjectiveOrientedContainer ( )

Definition at line 66 of file ilTestServiceGUITest.php.

66 : void
67 {
68 $mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
69 $this->testObj->setObjectiveOrientedContainer($mock);
70 $this->assertEquals($mock, $this->testObj->getObjectiveOrientedContainer());
71 }

◆ testParticipantData()

ilTestServiceGUITest::testParticipantData ( )

Definition at line 59 of file ilTestServiceGUITest.php.

59 : void
60 {
61 $mock = $this->createMock(ilTestParticipantData::class);
62 $this->testObj->setParticipantData($mock);
63 $this->assertEquals($mock, $this->testObj->getParticipantData());
64 }

Field Documentation

◆ $testObj

ilTestServiceGUI ilTestServiceGUITest::$testObj
private

Definition at line 27 of file ilTestServiceGUITest.php.


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