◆ testGetTaskInformations()
ilCertificateMigrationTest::testGetTaskInformations |
( |
| ) |
|
Definition at line 5 of file ilCertificateMigrationTest.php.
References $result.
7 $database = $this->getMockBuilder(
'ilDBInterface')
8 ->disableOriginalConstructor()
11 $statement = $this->getMockBuilder(
'ilDBStatement')
12 ->disableOriginalConstructor()
16 ->expects($this->atLeastOnce())
21 ->expects($this->atLeastOnce())
23 ->willReturn($statement);
26 ->expects($this->atLeastOnce())
27 ->method(
'fetchAssoc')
33 'processed_items' => 3,
34 'migrated_items' => 5,
37 'started_ts' => 123456789,
38 'finished_ts' => 987654321
43 $result = $migration->getTaskInformations();
45 $this->assertEquals(array(
50 'processed_items' => 3,
51 'migrated_items' => 5,
54 'started_ts' => 123456789,
55 'finished_ts' => 987654321
Class ilCertificateMigration.
◆ testGetTaskInformationsWithNoInformationStored()
ilCertificateMigrationTest::testGetTaskInformationsWithNoInformationStored |
( |
| ) |
|
Definition at line 59 of file ilCertificateMigrationTest.php.
References $result.
61 $database = $this->getMockBuilder(
'ilDBInterface')
62 ->disableOriginalConstructor()
65 $statement = $this->getMockBuilder(
'ilDBStatement')
66 ->disableOriginalConstructor()
70 ->expects($this->atLeastOnce())
75 ->expects($this->atLeastOnce())
77 ->willReturn($statement);
80 ->expects($this->atLeastOnce())
81 ->method(
'fetchAssoc')
87 'processed_items' => 3,
88 'migrated_items' => 5,
91 'started_ts' => 123456789,
92 'finished_ts' => 987654321
97 $result = $migration->getTaskInformationObject();
99 $this->assertEquals(100,
$result->getId());
Class ilCertificateMigration.
◆ testIsTaskFailed()
ilCertificateMigrationTest::testIsTaskFailed |
( |
| ) |
|
Definition at line 231 of file ilCertificateMigrationTest.php.
References $result.
233 $database = $this->getMockBuilder(
'ilDBInterface')
234 ->disableOriginalConstructor()
237 $statement = $this->getMockBuilder(
'ilDBStatement')
238 ->disableOriginalConstructor()
242 ->expects($this->atLeastOnce())
247 ->expects($this->atLeastOnce())
249 ->willReturn($statement);
252 ->expects($this->atLeastOnce())
253 ->method(
'fetchAssoc')
259 'processed_items' => 3,
260 'migrated_items' => 5,
263 'started_ts' => 123456789,
264 'finished_ts' => 987654321
269 $result = $migration->isTaskFailed();
Class ilCertificateMigration.
◆ testIsTaskFinished()
ilCertificateMigrationTest::testIsTaskFinished |
( |
| ) |
|
Definition at line 274 of file ilCertificateMigrationTest.php.
References $result.
276 $database = $this->getMockBuilder(
'ilDBInterface')
277 ->disableOriginalConstructor()
280 $statement = $this->getMockBuilder(
'ilDBStatement')
281 ->disableOriginalConstructor()
285 ->expects($this->atLeastOnce())
290 ->expects($this->atLeastOnce())
292 ->willReturn($statement);
295 ->expects($this->atLeastOnce())
296 ->method(
'fetchAssoc')
302 'processed_items' => 3,
303 'migrated_items' => 5,
305 'state' =>
'finished',
306 'started_ts' => 123456789,
307 'finished_ts' => 987654321
312 $result = $migration->isTaskFinished();
Class ilCertificateMigration.
◆ testIsTaskRunning()
ilCertificateMigrationTest::testIsTaskRunning |
( |
| ) |
|
Definition at line 188 of file ilCertificateMigrationTest.php.
References $result.
190 $database = $this->getMockBuilder(
'ilDBInterface')
191 ->disableOriginalConstructor()
194 $statement = $this->getMockBuilder(
'ilDBStatement')
195 ->disableOriginalConstructor()
199 ->expects($this->atLeastOnce())
204 ->expects($this->atLeastOnce())
206 ->willReturn($statement);
209 ->expects($this->atLeastOnce())
210 ->method(
'fetchAssoc')
216 'processed_items' => 3,
217 'migrated_items' => 5,
219 'state' =>
'running',
220 'started_ts' => 123456789,
221 'finished_ts' => 987654321
226 $result = $migration->isTaskRunning();
Class ilCertificateMigration.
◆ testIsTaskStarted()
ilCertificateMigrationTest::testIsTaskStarted |
( |
| ) |
|
Definition at line 145 of file ilCertificateMigrationTest.php.
References $result.
147 $database = $this->getMockBuilder(
'ilDBInterface')
148 ->disableOriginalConstructor()
151 $statement = $this->getMockBuilder(
'ilDBStatement')
152 ->disableOriginalConstructor()
156 ->expects($this->atLeastOnce())
161 ->expects($this->atLeastOnce())
163 ->willReturn($statement);
166 ->expects($this->atLeastOnce())
167 ->method(
'fetchAssoc')
173 'processed_items' => 3,
174 'migrated_items' => 5,
176 'state' =>
'not started',
177 'started_ts' => 123456789,
178 'finished_ts' => 987654321
183 $result = $migration->isTaskStarted();
Class ilCertificateMigration.
◆ testProgressedItemsAsPercent()
ilCertificateMigrationTest::testProgressedItemsAsPercent |
( |
| ) |
|
Definition at line 102 of file ilCertificateMigrationTest.php.
References $result.
104 $database = $this->getMockBuilder(
'ilDBInterface')
105 ->disableOriginalConstructor()
108 $statement = $this->getMockBuilder(
'ilDBStatement')
109 ->disableOriginalConstructor()
113 ->expects($this->atLeastOnce())
118 ->expects($this->atLeastOnce())
120 ->willReturn($statement);
123 ->expects($this->atLeastOnce())
124 ->method(
'fetchAssoc')
130 'processed_items' => 3,
131 'migrated_items' => 5,
134 'started_ts' => 123456789,
135 'finished_ts' => 987654321
140 $result = $migration->getProgressedItemsAsPercent();
142 $this->assertEquals(75,
$result);
Class ilCertificateMigration.
The documentation for this class was generated from the following file: