◆ testValidationReturnedFalseBecauseCertificateAreNotGloballyActivated()
ilCertificateDownloadValidatorTest::testValidationReturnedFalseBecauseCertificateAreNotGloballyActivated |
( |
| ) |
|
Definition at line 48 of file ilCertificateDownloadValidatorTest.php.
50 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
51 ->disableOriginalConstructor()
54 $userCertificateRepository
55 ->expects($this->never())
56 ->method(
'fetchActiveCertificate');
60 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
61 ->disableOriginalConstructor()
70 $result = $validator->isCertificateDownloadable(100, 100);
72 $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 75 of file ilCertificateDownloadValidatorTest.php.
77 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
78 ->disableOriginalConstructor()
81 $userCertificateRepository
82 ->expects($this->once())
83 ->method(
'fetchActiveCertificate')
88 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
89 ->disableOriginalConstructor()
98 $result = $validator->isCertificateDownloadable(100, 100);
100 $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 23 of file ilCertificateDownloadValidatorTest.php.
25 $userCertificateRepository = $this->getMockBuilder(ilUserCertificateRepository::class)
26 ->disableOriginalConstructor()
30 $userCertificateRepository->method(
'fetchActiveCertificate');
34 $activeValidator = $this->getMockBuilder(ilCertificateActiveValidator::class)
35 ->disableOriginalConstructor()
38 $activeValidator->method(
'validate')
43 $result = $validator->isCertificateDownloadable(100, 100);
45 $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: