◆ testUserIsNoProloaded()
ilCertificateUserForObjectPreloaderTest::testUserIsNoProloaded |
( |
| ) |
|
Definition at line 59 of file ilCertificateUserForObjectPreloaderTest.php.
References $result.
61 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
62 ->disableOriginalConstructor()
65 $userCertificateRepository->method(
'fetchUserIdsWithCertificateForObject')
66 ->willReturn(array(1, 2, 3));
68 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
69 ->disableOriginalConstructor()
72 $activeValidator->method(
'validate')
77 $preloader->preLoadDownloadableCertificates(100);
79 $result = $preloader->isPreloaded(200, 1);
◆ testUsersWithCertifcatesWillBePreoloaded()
ilCertificateUserForObjectPreloaderTest::testUsersWithCertifcatesWillBePreoloaded |
( |
| ) |
|
Definition at line 9 of file ilCertificateUserForObjectPreloaderTest.php.
References $result.
11 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
12 ->disableOriginalConstructor()
15 $userCertificateRepository->method(
'fetchUserIdsWithCertificateForObject')
16 ->willReturn(array(1, 2, 3));
18 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
19 ->disableOriginalConstructor()
22 $activeValidator->method(
'validate')
27 $preloader->preLoadDownloadableCertificates(100);
29 $result = $preloader->isPreloaded(100, 1);
◆ testUserWithCertificateIsNotPreloaded()
ilCertificateUserForObjectPreloaderTest::testUserWithCertificateIsNotPreloaded |
( |
| ) |
|
Definition at line 34 of file ilCertificateUserForObjectPreloaderTest.php.
References $result.
36 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
37 ->disableOriginalConstructor()
40 $userCertificateRepository->method(
'fetchUserIdsWithCertificateForObject')
41 ->willReturn(array(1, 2, 3));
43 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
44 ->disableOriginalConstructor()
47 $activeValidator->method(
'validate')
52 $preloader->preLoadDownloadableCertificates(100);
54 $result = $preloader->isPreloaded(100, 5);
◆ testWontPreloadBecauseCertificatesAreCurrentlyInActive()
ilCertificateUserForObjectPreloaderTest::testWontPreloadBecauseCertificatesAreCurrentlyInActive |
( |
| ) |
|
Definition at line 84 of file ilCertificateUserForObjectPreloaderTest.php.
References $result.
86 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
87 ->disableOriginalConstructor()
90 $userCertificateRepository
91 ->expects($this->never())
92 ->method(
'fetchUserIdsWithCertificateForObject');
94 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
95 ->disableOriginalConstructor()
98 $activeValidator->method(
'validate')
103 $preloader->preLoadDownloadableCertificates(100);
105 $result = $preloader->isPreloaded(100, 5);
The documentation for this class was generated from the following file: