109 : void
110 {
113 ->withProgressTree($pgs1)
114 ->withManuallyAssigned(false);
116 ->withProgressTree($pgs1)
117 ->withManuallyAssigned(true);
118 $this->adapter
119 ->expects($this->once())
120 ->method('getRelevantProgrammeIds')
121 ->willReturn([
122 1 => 3
123 ]);
124 $this->assignment_repo
125 ->expects($this->once())
126 ->method('getAboutToExpire')
127 ->willReturn([$ass1, $ass2]);
128
129 $this->assignment_repo
130 ->expects($this->exactly(1))
131 ->method('store');
132
133 $validity_settings = $this->getMockBuilder(ilStudyProgrammeValidityOfAchievedQualificationSettings::class)
134 ->disableOriginalConstructor()
135 ->onlyMethods(['getRestartRecheck'])
136 ->getMock();
137
138 $validity_settings
139 ->expects($this->exactly(2))
140 ->method('getRestartRecheck')
141 ->willReturn(true);
142
143 $settings = $this->getMockBuilder(ilStudyProgrammeSettings::class)
144 ->disableOriginalConstructor()
145 ->onlyMethods(['getValidityOfQualificationSettings'])
146 ->getMock();
147 $settings
148 ->expects($this->exactly(2))
149 ->method('getValidityOfQualificationSettings')
150 ->willReturn($validity_settings);
151
152 $this->prg
153 ->expects($this->exactly(2))
154 ->method('getSettings')
155 ->willReturn($settings);
156
157 $this->prg
158 ->expects($this->exactly(1))
159 ->method('getApplicableMembershipSourceForUser')
160 ->willReturn(null);
161
162 $this->prg
163 ->expects($this->exactly(1))
164 ->method('assignUser')
165 ->willReturn($ass1);
166
167
168 $this->adapter
169 ->expects($this->exactly(1))
170 ->method('actOnSingleAssignment');
171
172 $this->job->run();
173 }