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