◆ setUp()
ilStudyProgrammeCronRiskyToFailTest::setUp |
( |
| ) |
|
Definition at line 9 of file ilStudyProgrammeCronRiskyToFailTest.php.
12 ->getMockBuilder(ilPrgUserRiskyToFailCronJob::class)
13 ->disableOriginalConstructor()
14 ->onlyMethods([
'getEvents',
'getSettingsRepository',
'getProgressRepository',
'log'])
17 $this->settings_repo = $this->getMockBuilder(ilStudyProgrammeSettingsDBRepository::class)
18 ->disableOriginalConstructor()
19 ->onlyMethods([
'getProgrammeIdsWithRiskyToFailSettings'])
22 $this->progress_repo = $this->getMockBuilder(ilStudyProgrammeProgressDBRepository::class)
23 ->disableOriginalConstructor()
24 ->onlyMethods([
'getRiskyToFail'])
27 $this->events =
new ProgrammeEventsMock();
◆ testRiskyToFail()
ilStudyProgrammeCronRiskyToFailTest::testRiskyToFail |
( |
| ) |
|
Definition at line 80 of file ilStudyProgrammeCronRiskyToFailTest.php.
83 ->expects($this->once())
84 ->method(
'getProgrammeIdsWithRiskyToFailSettings')
85 ->willReturn([71 => 2]);
92 [
'userRiskyToFail', [
"progress_id" => 1,
"usr_id" => 11]],
93 [
'userRiskyToFail', [
"progress_id" => 2,
"usr_id" => 22]],
94 [
'userRiskyToFail', [
"progress_id" => 3,
"usr_id" => 33]]
98 ->expects($this->once())
99 ->method(
'getRiskyToFail')
106 $this->job->expects($this->once())
107 ->method(
'getSettingsRepository')
108 ->willReturn($this->settings_repo);
110 $this->job->expects($this->once())
111 ->method(
'getProgressRepository')
112 ->willReturn($this->progress_repo);
114 $this->job->expects($this->once())
115 ->method(
'getEvents')
116 ->willReturn($this->events);
119 $this->assertEquals($expected_events, $this->events->raised);
Class ilStudyProgrammeProgress.
◆ testRiskyToFailNoRepos()
ilStudyProgrammeCronRiskyToFailTest::testRiskyToFailNoRepos |
( |
| ) |
|
Definition at line 51 of file ilStudyProgrammeCronRiskyToFailTest.php.
54 ->expects($this->once())
55 ->method(
'getProgrammeIdsWithRiskyToFailSettings')
62 ->expects($this->once())
63 ->method(
'getRiskyToFail')
66 $this->job->expects($this->once())
67 ->method(
'getSettingsRepository')
68 ->willReturn($this->settings_repo);
70 $this->job->expects($this->once())
71 ->method(
'getProgressRepository')
72 ->willReturn($this->progress_repo);
74 $this->job->expects($this->never())
75 ->method(
'getEvents');
◆ testRiskyToFailNoSettings()
ilStudyProgrammeCronRiskyToFailTest::testRiskyToFailNoSettings |
( |
| ) |
|
Definition at line 30 of file ilStudyProgrammeCronRiskyToFailTest.php.
33 ->expects($this->once())
34 ->method(
'getProgrammeIdsWithRiskyToFailSettings')
38 $this->job->expects($this->once())
39 ->method(
'getSettingsRepository')
40 ->willReturn($this->settings_repo);
42 $this->job->expects($this->never())
43 ->method(
'getProgressRepository');
45 $this->job->expects($this->never())
46 ->method(
'getEvents');
The documentation for this class was generated from the following file: