ILIAS  release_8 Revision v8.23
ilTestPlayerFactoryTest 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 ilTestPlayerFactoryTest:
+ Collaboration diagram for ilTestPlayerFactoryTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testGetPlayerGUI ()
 

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

ilTestPlayerFactory $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 ilTestPlayerFactoryTest

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

Definition at line 25 of file ilTestPlayerFactoryTest.php.

Member Function Documentation

◆ setUp()

ilTestPlayerFactoryTest::setUp ( )
protected

Definition at line 29 of file ilTestPlayerFactoryTest.php.

29  : void
30  {
31  parent::setUp();
32 
33  $this->testObj = new ilTestPlayerFactory($this->createMock(ilObjTest::class));
34  }

◆ test_instantiateObject_shouldReturnInstance()

ilTestPlayerFactoryTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestPlayerFactoryTest.php.

36  : void
37  {
38  $this->assertInstanceOf(ilTestPlayerFactory::class, $this->testObj);
39  }

◆ testGetPlayerGUI()

ilTestPlayerFactoryTest::testGetPlayerGUI ( )

Definition at line 41 of file ilTestPlayerFactoryTest.php.

References ilTestBaseTestCase\addGlobal_ilAppEventHandler(), ilTestBaseTestCase\addGlobal_ilComponentRepository(), ilTestBaseTestCase\addGlobal_ilCtrl(), ilTestBaseTestCase\addGlobal_ilDB(), ilTestBaseTestCase\addGlobal_ilErr(), ilTestBaseTestCase\addGlobal_ilias(), ilTestBaseTestCase\addGlobal_ilLog(), ilTestBaseTestCase\addGlobal_ilObjDataCache(), ilTestBaseTestCase\addGlobal_ilTabs(), ilTestBaseTestCase\addGlobal_ilUser(), ilTestBaseTestCase\addGlobal_lng(), ilTestBaseTestCase\addGlobal_objDefinition(), ilTestBaseTestCase\addGlobal_rbacsystem(), ilTestBaseTestCase\addGlobal_refinery(), ilTestBaseTestCase\addGlobal_tpl(), ilTestBaseTestCase\addGlobal_tree(), ilTestPlayerFactory\getPlayerGUI(), ilObjTest\QUESTION_SET_TYPE_FIXED, and ilObjTest\QUESTION_SET_TYPE_RANDOM.

41  : void
42  {
43  $this->addGlobal_ilUser();
44  $this->addGlobal_lng();
45  $this->addGlobal_ilias();
46  $this->addGlobal_ilDB();
47  $this->addGlobal_ilLog();
48  $this->addGlobal_ilErr();
49  $this->addGlobal_tree();
51  $this->addGlobal_objDefinition();
52  $this->addGlobal_tpl();
53  $this->addGlobal_ilCtrl();
55  $this->addGlobal_ilTabs();
56  $this->addGlobal_ilObjDataCache();
57  $this->addGlobal_rbacsystem();
58  $this->addGlobal_refinery();
59 
60  $objTest = new ilObjTest();
61 
62  $objTest->setQuestionSetType(ilObjTest::QUESTION_SET_TYPE_FIXED);
63  $testObj = new ilTestPlayerFactory($objTest);
64  $this->assertInstanceOf(ilTestPlayerFixedQuestionSetGUI::class, $testObj->getPlayerGUI());
65 
66  $objTest->setQuestionSetType(ilObjTest::QUESTION_SET_TYPE_RANDOM);
67  $testObj = new ilTestPlayerFactory($objTest);
68  $this->assertInstanceOf(ilTestPlayerRandomQuestionSetGUI::class, $testObj->getPlayerGUI());
69  }
const QUESTION_SET_TYPE_RANDOM
getPlayerGUI()
creates and returns an instance of a player gui that corresponds to the current test mode ...
const QUESTION_SET_TYPE_FIXED
+ Here is the call graph for this function:

Field Documentation

◆ $testObj

ilTestPlayerFactory ilTestPlayerFactoryTest::$testObj
private

Definition at line 27 of file ilTestPlayerFactoryTest.php.


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