◆ testFetchingDataSetForTableWithLimitParamterAndWithoutFilters()
ilUserCertificateTableProviderTest::testFetchingDataSetForTableWithLimitParamterAndWithoutFilters |
( |
| ) |
|
Definition at line 83 of file ilUserCertificateTableProviderTest.php.
References $provider.
85 $database = $this->createMock(ilDBInterface::class);
88 ->expects($this->atLeastOnce())
91 $database->method(
'fetchAssoc')
92 ->willReturnOnConsecutiveCalls(
96 'title' =>
'CourseTest',
98 'acquired_timestamp' => 1539867618,
99 'thumbnail_image_path' =>
'some/path/test.svg',
100 'description' =>
'some description',
101 'firstname' =>
'ilyas',
102 'lastname' =>
'homer',
111 $logger = $this->getMockBuilder(ilLogger::class)
112 ->disableOriginalConstructor()
121 $dataSet =
$provider->fetchDataSet(100, [
'language' =>
'de',
'limit' => 2], []);
125 $expected[
'items'][] = [
127 'title' =>
'CourseTest',
130 'date' => 1539867618,
131 'thumbnail_image_path' =>
'some/path/test.svg',
132 'description' =>
'some description',
133 'firstname' =>
'ilyas',
134 'lastname' =>
'homer',
137 $expected[
'cnt'] = 5;
139 $this->assertSame($expected, $dataSet);
◆ testFetchingDataSetForTableWithOrderFieldDate()
ilUserCertificateTableProviderTest::testFetchingDataSetForTableWithOrderFieldDate |
( |
| ) |
|
Definition at line 142 of file ilUserCertificateTableProviderTest.php.
References $provider.
144 $database = $this->createMock(ilDBInterface::class);
147 ->expects($this->atLeastOnce())
150 $database->method(
'fetchAssoc')
151 ->willReturnOnConsecutiveCalls(
155 'title' =>
'CourseTest',
157 'acquired_timestamp' => 1539867618,
158 'thumbnail_image_path' =>
'some/path/test.svg',
159 'description' =>
'some description',
160 'firstname' =>
'ilyas',
161 'lastname' =>
'homer',
170 $logger = $this->getMockBuilder(ilLogger::class)
171 ->disableOriginalConstructor()
182 [
'language' =>
'de',
'limit' => 2,
'order_field' =>
'date'],
188 $expected[
'items'][] = [
190 'title' =>
'CourseTest',
193 'date' => 1539867618,
194 'thumbnail_image_path' =>
'some/path/test.svg',
195 'description' =>
'some description',
196 'firstname' =>
'ilyas',
197 'lastname' =>
'homer',
200 $expected[
'cnt'] = 5;
202 $this->assertSame($expected, $dataSet);
◆ testFetchingDataSetForTableWithoutParamtersAndWithoutFilters()
ilUserCertificateTableProviderTest::testFetchingDataSetForTableWithoutParamtersAndWithoutFilters |
( |
| ) |
|
Definition at line 26 of file ilUserCertificateTableProviderTest.php.
References $provider.
28 $database = $this->getMockBuilder(ilDBInterface::class)
29 ->disableOriginalConstructor()
33 ->expects($this->atLeastOnce())
36 $database->method(
'fetchAssoc')
37 ->willReturnOnConsecutiveCalls(
41 'title' =>
'CourseTest',
43 'acquired_timestamp' => 1539867618,
44 'thumbnail_image_path' =>
'some/path/test.svg',
45 'description' =>
'some description',
46 'firstname' =>
'ilyas',
47 'lastname' =>
'homer',
52 $logger = $this->getMockBuilder(ilLogger::class)
53 ->disableOriginalConstructor()
62 $dataSet =
$provider->fetchDataSet(100, [
'language' =>
'de'], []);
66 $expected[
'items'][] = [
68 'title' =>
'CourseTest',
72 'thumbnail_image_path' =>
'some/path/test.svg',
73 'description' =>
'some description',
74 'firstname' =>
'ilyas',
75 'lastname' =>
'homer',
80 $this->assertSame($expected, $dataSet);
◆ testFetchingDataWithEmptyOrderFieldWillResultInException()
ilUserCertificateTableProviderTest::testFetchingDataWithEmptyOrderFieldWillResultInException |
( |
| ) |
|
Definition at line 250 of file ilUserCertificateTableProviderTest.php.
References $provider.
252 $this->expectException(InvalidArgumentException::class);
254 $database = $this->createMock(ilDBInterface::class);
257 ->expects($this->atLeastOnce())
260 $database->method(
'fetchAssoc')
261 ->willReturnOnConsecutiveCalls(
265 'title' =>
'CourseTest',
267 'acquired_timestamp' => 1539867618
276 $logger = $this->getMockBuilder(ilLogger::class)
277 ->disableOriginalConstructor()
288 [
'language' =>
'de',
'limit' => 2,
'order_field' =>
false],
292 $this->fail(
'Should never happen');
◆ testFetchingDataWithInvalidLimitParameterWillResultInException()
ilUserCertificateTableProviderTest::testFetchingDataWithInvalidLimitParameterWillResultInException |
( |
| ) |
|
Definition at line 345 of file ilUserCertificateTableProviderTest.php.
References $provider.
347 $this->expectException(InvalidArgumentException::class);
349 $database = $this->createMock(ilDBInterface::class);
352 ->expects($this->atLeastOnce())
355 $database->method(
'fetchAssoc')
356 ->willReturnOnConsecutiveCalls(
360 'title' =>
'CourseTest',
362 'acquired_timestamp' => 1539867618
371 $logger = $this->getMockBuilder(ilLogger::class)
372 ->disableOriginalConstructor()
385 'limit' =>
'something',
386 'order_field' =>
'date',
387 'order_direction' =>
'mac' 392 $this->fail(
'Should never happen');
◆ testFetchingDataWithInvalidOffsetParameterWillResultInException()
ilUserCertificateTableProviderTest::testFetchingDataWithInvalidOffsetParameterWillResultInException |
( |
| ) |
|
Definition at line 395 of file ilUserCertificateTableProviderTest.php.
References $provider.
397 $this->expectException(InvalidArgumentException::class);
399 $database = $this->createMock(ilDBInterface::class);
402 ->expects($this->atLeastOnce())
405 $database->method(
'fetchAssoc')
406 ->willReturnOnConsecutiveCalls(
410 'title' =>
'CourseTest',
412 'acquired_timestamp' => 1539867618
421 $logger = $this->getMockBuilder(ilLogger::class)
422 ->disableOriginalConstructor()
436 'order_field' =>
'date',
437 'order_direction' =>
'mac',
438 'offset' =>
'something' 443 $this->fail(
'Should never happen');
◆ testFetchingDataWithInvalidOrderFieldWillResultInException()
ilUserCertificateTableProviderTest::testFetchingDataWithInvalidOrderFieldWillResultInException |
( |
| ) |
|
Definition at line 205 of file ilUserCertificateTableProviderTest.php.
References $provider.
207 $this->expectException(InvalidArgumentException::class);
209 $database = $this->createMock(ilDBInterface::class);
212 ->expects($this->atLeastOnce())
215 $database->method(
'fetchAssoc')
216 ->willReturnOnConsecutiveCalls(
220 'title' =>
'CourseTest',
222 'acquired_timestamp' => 1539867618
231 $logger = $this->getMockBuilder(ilLogger::class)
232 ->disableOriginalConstructor()
243 [
'language' =>
'de',
'limit' => 2,
'order_field' =>
'something'],
247 $this->fail(
'Should never happen');
◆ testFetchingDataWithWrongOrderDirectionWillResultInException()
ilUserCertificateTableProviderTest::testFetchingDataWithWrongOrderDirectionWillResultInException |
( |
| ) |
|
Definition at line 295 of file ilUserCertificateTableProviderTest.php.
References $provider.
297 $this->expectException(InvalidArgumentException::class);
299 $database = $this->createMock(ilDBInterface::class);
302 ->expects($this->atLeastOnce())
305 $database->method(
'fetchAssoc')
306 ->willReturnOnConsecutiveCalls(
310 'title' =>
'CourseTest',
312 'acquired_timestamp' => 1539867618
321 $logger = $this->getMockBuilder(ilLogger::class)
322 ->disableOriginalConstructor()
336 'order_field' =>
'date',
337 'order_direction' =>
'mac' 342 $this->fail(
'Should never happen');
The documentation for this class was generated from the following file: