◆ testValidationReturnedFalseBecauseCertificateAreNotGloballyActivated()
ilCertificateDownloadValidatorTest::testValidationReturnedFalseBecauseCertificateAreNotGloballyActivated |
( |
| ) |
|
Definition at line 51 of file ilCertificateDownloadValidatorTest.php.
53 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
54 ->disableOriginalConstructor()
57 $userCertificateRepository
58 ->expects($this->never())
59 ->method(
'fetchActiveCertificate');
63 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
64 ->disableOriginalConstructor()
73 $result = $validator->isCertificateDownloadable(100, 100);
75 $this->assertFalse($result);
Validates if an active certificate is stored in the database and can be downloaded by the user...
◆ testValidationReturnedFalseBecauseJavaServerIsNotActive()
ilCertificateDownloadValidatorTest::testValidationReturnedFalseBecauseJavaServerIsNotActive |
( |
| ) |
|
Definition at line 78 of file ilCertificateDownloadValidatorTest.php.
80 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
81 ->disableOriginalConstructor()
84 $userCertificateRepository
85 ->expects($this->once())
86 ->method(
'fetchActiveCertificate')
91 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
92 ->disableOriginalConstructor()
101 $result = $validator->isCertificateDownloadable(100, 100);
103 $this->assertFalse($result);
Validates if an active certificate is stored in the database and can be downloaded by the user...
Class ilRpcClientException.
◆ testValidationSucceedsAndReturnsTrue()
ilCertificateDownloadValidatorTest::testValidationSucceedsAndReturnsTrue |
( |
| ) |
|
Definition at line 26 of file ilCertificateDownloadValidatorTest.php.
28 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
29 ->disableOriginalConstructor()
33 $userCertificateRepository->method(
'fetchActiveCertificate');
37 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
38 ->disableOriginalConstructor()
41 $activeValidator->method(
'validate')
46 $result = $validator->isCertificateDownloadable(100, 100);
48 $this->assertTrue($result);
Validates if an active certificate is stored in the database and can be downloaded by the user...
The documentation for this class was generated from the following file: