19 declare(strict_types=1);
32 protected function setUp(): void
36 $this->addGlobal_ilObjDataCache();
37 $this->addGlobal_ilUser();
38 $this->addGlobal_lng();
39 $this->addGlobal_ilDB();
40 if (!defined(
"ILIAS_LOG_ENABLED")) {
41 define(
"ILIAS_LOG_ENABLED",
false);
49 $this->assertInstanceOf(ilCronFinishUnfinishedTestPasses::class, $this->test_obj);
54 $this->assertEquals(
'finish_unfinished_passes', $this->test_obj->getId());
59 $lng_mock = $this->createMock(ilLanguage::class);
61 ->expects($this->any())
63 ->with(
'finish_unfinished_passes')
64 ->willReturn(
'testString')
67 $this->setGlobalVariable(
'lng', $lng_mock);
70 $this->assertEquals(
'testString', $test_obj->
getTitle());
75 $lng_mock = $this->createMock(ilLanguage::class);
77 ->expects($this->any())
79 ->with(
'finish_unfinished_passes_desc')
80 ->willReturn(
'testString')
83 $this->setGlobalVariable(
'lng', $lng_mock);
91 $this->assertEquals(JobScheduleType::DAILY, $this->test_obj->getDefaultScheduleType());
96 $this->assertFalse($this->test_obj->hasAutoActivation());
101 $this->assertTrue($this->test_obj->hasFlexibleSchedule());
106 $this->assertTrue($this->test_obj->hasCustomSettings());
111 $this->markTestSkipped(
'Failed for some unknown reason.');
112 $this->assertInstanceOf(JobResult::class, $this->test_obj->run());
Class ilCronFinishUnfinishedTestPassesTest.
test_instantiateObject_shouldReturnInstance()
Class ilCronFinishUnfinishedTestPasses.
testGetDefaultScheduleType()
ilCronFinishUnfinishedTestPasses $test_obj
testHasFlexibleSchedule()