19 declare(strict_types=1);
24 protected int $id = 123;
32 $this->createMock(ilStudyProgrammeTypeSettings::class),
33 $this->createMock(ilStudyProgrammeAssessmentSettings::class),
34 $this->createMock(ilStudyProgrammeDeadlineSettings::class),
35 $this->createMock(ilStudyProgrammeValidityOfAchievedQualificationSettings::class),
36 $this->createMock(ilStudyProgrammeAutoMailSettings::class)
42 $this->assertEquals($this->
id, $this->prg_settings->getObjId());
43 $this->assertEquals(345, $this->prg_settings->withObjId(345)->getObjId());
44 $this->assertInstanceOf(ilStudyProgrammeSettings::class, $this->prg_settings->updateLastChange());
53 $this->assertInstanceOf(ilStudyProgrammeTypeSettings::class, $this->prg_settings->getTypeSettings());
54 $this->assertInstanceOf(ilStudyProgrammeAssessmentSettings::class, $this->prg_settings->getAssessmentSettings());
55 $this->assertInstanceOf(ilStudyProgrammeDeadlineSettings::class, $this->prg_settings->getDeadlineSettings());
56 $this->assertInstanceOf(ilStudyProgrammeValidityOfAchievedQualificationSettings::class, $this->prg_settings->getValidityOfQualificationSettings());
57 $this->assertInstanceOf(ilStudyProgrammeAutoMailSettings::class, $this->prg_settings->getAutoMailSettings());
63 $prg_settings = $this->prg_settings->
setLastChange($last_change);
67 $this->assertNotEquals($last_change, $prg_settings->
getLastChange());
72 $this->expectException(\ilException::class);
73 $this->prg_settings->setLPMode(-200);
78 $mock_validity_settings = $this->createMock(ilStudyProgrammeValidityOfAchievedQualificationSettings::class);
79 $mock_validity_settings
80 ->expects($this->once())
81 ->method(
'getQualificationDate')
86 ->withValidityOfQualificationSettings($mock_validity_settings)
90 $mock_validity_settings = $this->createMock(ilStudyProgrammeValidityOfAchievedQualificationSettings::class);
91 $mock_validity_settings
92 ->expects($this->once())
93 ->method(
'getQualificationPeriod')
98 ->withValidityOfQualificationSettings($mock_validity_settings)
101 $mock_validity_settings = $this->createMock(ilStudyProgrammeValidityOfAchievedQualificationSettings::class);
102 $mock_validity_settings
103 ->expects($this->once())
104 ->method(
'getQualificationDate')
106 $mock_validity_settings
107 ->expects($this->once())
108 ->method(
'getQualificationPeriod')
113 ->withValidityOfQualificationSettings($mock_validity_settings)
114 ->validationExpires()
setLastChange(DateTime $a_timestamp)
Set the last change timestamp to the given time.
getLastChange()
Get the timestamp of the last change on this program or a sub program.
const NO_VALIDITY_OF_QUALIFICATION_PERIOD
testPRGSettingsReturnOfSubSettings()
setLPMode(int $a_mode)
Set the lp mode.
testPRGSettingsBasicProperties()
testPRGSettingsValidationExpires()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
testPRGSettingsLPModeFails()
ilStudyProgrammeSettings $prg_settings