◆ testUserIsNoProloaded()
ilCertificateObjectsForUserPreloaderTest::testUserIsNoProloaded |
( |
| ) |
|
Definition at line 59 of file ilCertificateObjectsForUserPreloaderTest.php.
61 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
62 ->disableOriginalConstructor()
65 $userCertificateRepository->method(
'fetchObjectIdsWithCertificateForUser')
66 ->willReturn([1, 2, 3]);
70 $preloader->preLoad(100, [500, 200]);
72 $result = $preloader->isPreloaded(200, 1);
74 $this->assertFalse($result);
◆ testUsersWithCertifcatesWillBePreoloaded()
ilCertificateObjectsForUserPreloaderTest::testUsersWithCertifcatesWillBePreoloaded |
( |
| ) |
|
Definition at line 23 of file ilCertificateObjectsForUserPreloaderTest.php.
25 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
26 ->disableOriginalConstructor()
29 $userCertificateRepository->method(
'fetchObjectIdsWithCertificateForUser')
30 ->willReturn([1, 2, 3]);
34 $preloader->preLoad(100, [500, 200]);
36 $result = $preloader->isPreloaded(100, 1);
38 $this->assertTrue($result);
◆ testUserWithCertificateIsNotPreloaded()
ilCertificateObjectsForUserPreloaderTest::testUserWithCertificateIsNotPreloaded |
( |
| ) |
|
Definition at line 41 of file ilCertificateObjectsForUserPreloaderTest.php.
43 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
44 ->disableOriginalConstructor()
47 $userCertificateRepository->method(
'fetchObjectIdsWithCertificateForUser')
48 ->willReturn([1, 2, 3]);
52 $preloader->preLoad(100, [500, 200]);
54 $result = $preloader->isPreloaded(100, 5);
56 $this->assertFalse($result);
The documentation for this class was generated from the following file: