◆ testUserIsNoProloaded()
ilCertificateObjectsForUserPreloaderTest::testUserIsNoProloaded |
( |
| ) |
|
Definition at line 59 of file ilCertificateObjectsForUserPreloaderTest.php.
59 : void
60 {
61 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
62 ->disableOriginalConstructor()
63 ->getMock();
64
65 $userCertificateRepository->method('fetchObjectIdsWithCertificateForUser')
66 ->willReturn([1, 2, 3]);
67
69
70 $preloader->preLoad(100, [500, 200]);
71
72 $result = $preloader->isPreloaded(200, 1);
73
74 $this->assertFalse($result);
75 }
◆ testUsersWithCertifcatesWillBePreoloaded()
ilCertificateObjectsForUserPreloaderTest::testUsersWithCertifcatesWillBePreoloaded |
( |
| ) |
|
Definition at line 23 of file ilCertificateObjectsForUserPreloaderTest.php.
23 : void
24 {
25 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
26 ->disableOriginalConstructor()
27 ->getMock();
28
29 $userCertificateRepository->method('fetchObjectIdsWithCertificateForUser')
30 ->willReturn([1, 2, 3]);
31
33
34 $preloader->preLoad(100, [500, 200]);
35
36 $result = $preloader->isPreloaded(100, 1);
37
38 $this->assertTrue($result);
39 }
◆ testUserWithCertificateIsNotPreloaded()
ilCertificateObjectsForUserPreloaderTest::testUserWithCertificateIsNotPreloaded |
( |
| ) |
|
Definition at line 41 of file ilCertificateObjectsForUserPreloaderTest.php.
41 : void
42 {
43 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
44 ->disableOriginalConstructor()
45 ->getMock();
46
47 $userCertificateRepository->method('fetchObjectIdsWithCertificateForUser')
48 ->willReturn([1, 2, 3]);
49
51
52 $preloader->preLoad(100, [500, 200]);
53
54 $result = $preloader->isPreloaded(100, 5);
55
56 $this->assertFalse($result);
57 }
The documentation for this class was generated from the following file: