19 declare(strict_types=1);
31 protected function setUp(): void
35 $this->addGlobal_ilObjDataCache();
36 $this->addGlobal_ilUser();
37 $this->addGlobal_lng();
38 $this->addGlobal_ilDB();
39 if (!defined(
"ILIAS_LOG_ENABLED")) {
40 define(
"ILIAS_LOG_ENABLED",
false);
48 $this->assertInstanceOf(ilCronFinishUnfinishedTestPasses::class, $this->test_obj);
53 $this->assertEquals(
'finish_unfinished_passes', $this->test_obj->getId());
58 $lng_mock = $this->createMock(ilLanguage::class);
60 ->expects($this->any())
62 ->with(
'finish_unfinished_passes')
63 ->willReturn(
'testString')
66 $this->setGlobalVariable(
'lng', $lng_mock);
69 $this->assertEquals(
'testString', $test_obj->
getTitle());
74 $lng_mock = $this->createMock(ilLanguage::class);
76 ->expects($this->any())
78 ->with(
'finish_unfinished_passes_desc')
79 ->willReturn(
'testString')
82 $this->setGlobalVariable(
'lng', $lng_mock);
90 $this->assertEquals(CronJobScheduleType::SCHEDULE_TYPE_DAILY, $this->test_obj->getDefaultScheduleType());
95 $this->assertFalse($this->test_obj->hasAutoActivation());
100 $this->assertTrue($this->test_obj->hasFlexibleSchedule());
105 $this->assertTrue($this->test_obj->hasCustomSettings());
110 $this->markTestSkipped(
'Failed for some unknown reason.');
111 $this->assertInstanceOf(ilCronJobResult::class, $this->test_obj->run());
Class ilCronFinishUnfinishedTestPassesTest.
test_instantiateObject_shouldReturnInstance()
Class ilCronFinishUnfinishedTestPasses.
testGetDefaultScheduleType()
ilCronFinishUnfinishedTestPasses $test_obj
testHasFlexibleSchedule()