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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testGetId ()
 
 testGetTitle ()
 
 testGetDescription ()
 
 testGetDefaultScheduleType ()
 
 testHasAutoActivation ()
 
 testHasFlexibleSchedule ()
 
 testHasCustomSettings ()
 
 testRun ()
 

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

ilCronFinishUnfinishedTestPasses $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 ilCronFinishUnfinishedTestPassesTest

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

Definition at line 25 of file ilCronFinishUnfinishedTestPassesTest.php.

Member Function Documentation

◆ setUp()

ilCronFinishUnfinishedTestPassesTest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilCronFinishUnfinishedTestPassesTest.php.

29 : void
30 {
31 parent::setUp();
32
34 $this->addGlobal_lng();
35 $this->addGlobal_ilDB();
36
37 $this->testObj = new ilCronFinishUnfinishedTestPasses();
38 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilTestBaseTestCase\addGlobal_ilDB(), ilTestBaseTestCase\addGlobal_ilObjDataCache(), and ilTestBaseTestCase\addGlobal_lng().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilCronFinishUnfinishedTestPassesTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 40 of file ilCronFinishUnfinishedTestPassesTest.php.

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

◆ testGetDefaultScheduleType()

ilCronFinishUnfinishedTestPassesTest::testGetDefaultScheduleType ( )

Definition at line 78 of file ilCronFinishUnfinishedTestPassesTest.php.

78 : void
79 {
80 $this->assertEquals(
82 $this->testObj->getDefaultScheduleType()
83 );
84 }
const SCHEDULE_TYPE_DAILY
@depracated This will be replaced with an ENUM in ILIAS 9

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ testGetDescription()

ilCronFinishUnfinishedTestPassesTest::testGetDescription ( )

Definition at line 64 of file ilCronFinishUnfinishedTestPassesTest.php.

64 : void
65 {
66 $lng_mock = $this->createMock(ilLanguage::class);
67 $lng_mock
68 ->expects($this->any())
69 ->method("txt")
70 ->with("finish_unfinished_passes_desc")
71 ->willReturn("testString");
72
73 $this->setGlobalVariable("lng", $lng_mock);
74
75 $this->assertEquals("testString", $this->testObj->getDescription());
76 }
setGlobalVariable(string $name, $value)

References ilTestBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ testGetId()

ilCronFinishUnfinishedTestPassesTest::testGetId ( )

Definition at line 45 of file ilCronFinishUnfinishedTestPassesTest.php.

45 : void
46 {
47 $this->assertEquals("finish_unfinished_passes", $this->testObj->getId());
48 }

◆ testGetTitle()

ilCronFinishUnfinishedTestPassesTest::testGetTitle ( )

Definition at line 50 of file ilCronFinishUnfinishedTestPassesTest.php.

50 : void
51 {
52 $lng_mock = $this->createMock(ilLanguage::class);
53 $lng_mock
54 ->expects($this->any())
55 ->method("txt")
56 ->with("finish_unfinished_passes")
57 ->willReturn("testString");
58
59 $this->setGlobalVariable("lng", $lng_mock);
60
61 $this->assertEquals("testString", $this->testObj->getTitle());
62 }

References ilTestBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ testHasAutoActivation()

ilCronFinishUnfinishedTestPassesTest::testHasAutoActivation ( )

Definition at line 86 of file ilCronFinishUnfinishedTestPassesTest.php.

86 : void
87 {
88 $this->assertFalse($this->testObj->hasAutoActivation());
89 }

◆ testHasCustomSettings()

ilCronFinishUnfinishedTestPassesTest::testHasCustomSettings ( )

Definition at line 96 of file ilCronFinishUnfinishedTestPassesTest.php.

96 : void
97 {
98 $this->assertTrue($this->testObj->hasCustomSettings());
99 }

◆ testHasFlexibleSchedule()

ilCronFinishUnfinishedTestPassesTest::testHasFlexibleSchedule ( )

Definition at line 91 of file ilCronFinishUnfinishedTestPassesTest.php.

91 : void
92 {
93 $this->assertTrue($this->testObj->hasFlexibleSchedule());
94 }

◆ testRun()

ilCronFinishUnfinishedTestPassesTest::testRun ( )

Definition at line 101 of file ilCronFinishUnfinishedTestPassesTest.php.

101 : void
102 {
103 $this->assertInstanceOf(ilCronJobResult::class, $this->testObj->run());
104 }

Field Documentation

◆ $testObj

ilCronFinishUnfinishedTestPasses ilCronFinishUnfinishedTestPassesTest::$testObj
private

Definition at line 27 of file ilCronFinishUnfinishedTestPassesTest.php.


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