ILIAS  release_8 Revision v8.23
ilTestParticipantDataTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilTestParticipantDataTest:
+ Collaboration diagram for ilTestParticipantDataTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testParticipantAccessFilter ()
 
 testScoredParticipantsFilterEnabled ()
 
 testGetScoredParticipantsFilterExpression ()
 
 testActiveIdsFilter ()
 
 testUserIdsFilter ()
 
 testAnonymousIdsFilter ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Private Attributes

ilTestParticipantData $testObj
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilTestParticipantDataTest

Author
Marvin Beym mbeym.nosp@m.@dat.nosp@m.abay..nosp@m.de

Definition at line 25 of file ilTestParticipantDataTest.php.

Member Function Documentation

◆ setUp()

ilTestParticipantDataTest::setUp ( )
protected

Definition at line 29 of file ilTestParticipantDataTest.php.

29  : void
30  {
31  parent::setUp();
32 
33  $this->testObj = new ilTestParticipantData(
34  $this->createMock(ilDBInterface::class),
35  $this->createMock(ilLanguage::class)
36  );
37  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestParticipantDataTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 39 of file ilTestParticipantDataTest.php.

39  : void
40  {
41  $this->assertInstanceOf(ilTestParticipantData::class, $this->testObj);
42  }

◆ testActiveIdsFilter()

ilTestParticipantDataTest::testActiveIdsFilter ( )

Definition at line 74 of file ilTestParticipantDataTest.php.

74  : void
75  {
76  $expected = [1, 125, 1290];
77  $this->testObj->setActiveIdsFilter($expected);
78  $this->assertEquals($expected, $this->testObj->getActiveIdsFilter());
79  }

◆ testAnonymousIdsFilter()

ilTestParticipantDataTest::testAnonymousIdsFilter ( )

Definition at line 88 of file ilTestParticipantDataTest.php.

88  : void
89  {
90  $expected = [1, 125, 1290];
91  $this->testObj->setAnonymousIdsFilter($expected);
92  $this->assertEquals($expected, $this->testObj->getAnonymousIdsFilter());
93  }

◆ testGetScoredParticipantsFilterExpression()

ilTestParticipantDataTest::testGetScoredParticipantsFilterExpression ( )

Definition at line 63 of file ilTestParticipantDataTest.php.

63  : void
64  {
65  $this->assertEquals("1 = 1", $this->testObj->getScoredParticipantsFilterExpression());
66 
67  $this->testObj->setScoredParticipantsFilterEnabled(true);
68  $this->assertEquals(
69  "ta.last_finished_pass = ta.last_started_pass",
70  $this->testObj->getScoredParticipantsFilterExpression()
71  );
72  }

◆ testParticipantAccessFilter()

ilTestParticipantDataTest::testParticipantAccessFilter ( )

Definition at line 44 of file ilTestParticipantDataTest.php.

44  : void
45  {
46  $callback = static function () {
47  return "Hello";
48  };
49 
50  $this->testObj->setParticipantAccessFilter($callback);
51  $this->assertEquals($callback, $this->testObj->getParticipantAccessFilter());
52  }

◆ testScoredParticipantsFilterEnabled()

ilTestParticipantDataTest::testScoredParticipantsFilterEnabled ( )

Definition at line 54 of file ilTestParticipantDataTest.php.

54  : void
55  {
56  $this->testObj->setScoredParticipantsFilterEnabled(false);
57  $this->assertFalse($this->testObj->isScoredParticipantsFilterEnabled());
58 
59  $this->testObj->setScoredParticipantsFilterEnabled(true);
60  $this->assertTrue($this->testObj->isScoredParticipantsFilterEnabled());
61  }

◆ testUserIdsFilter()

ilTestParticipantDataTest::testUserIdsFilter ( )

Definition at line 81 of file ilTestParticipantDataTest.php.

81  : void
82  {
83  $expected = [1, 125, 1290];
84  $this->testObj->setUserIdsFilter($expected);
85  $this->assertEquals($expected, $this->testObj->getUserIdsFilter());
86  }

Field Documentation

◆ $testObj

ilTestParticipantData ilTestParticipantDataTest::$testObj
private

Definition at line 27 of file ilTestParticipantDataTest.php.


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