11 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
12 ->disableOriginalConstructor()
16 $userCertificateRepository->method(
'fetchActiveCertificate');
20 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
21 ->disableOriginalConstructor()
24 $activeValidator->method(
'validate')
29 $result = $validator->isCertificateDownloadable(100, 100);
36 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
37 ->disableOriginalConstructor()
40 $userCertificateRepository
41 ->expects($this->never())
42 ->method(
'fetchActiveCertificate');
46 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
47 ->disableOriginalConstructor()
56 $result = $validator->isCertificateDownloadable(100, 100);
63 $userCertificateRepository = $this->getMockBuilder(
'ilUserCertificateRepository')
64 ->disableOriginalConstructor()
67 $userCertificateRepository
68 ->expects($this->
once())
69 ->method(
'fetchActiveCertificate')
74 $activeValidator = $this->getMockBuilder(
'ilCertificateActiveValidator')
75 ->disableOriginalConstructor()
84 $result = $validator->isCertificateDownloadable(100, 100);
testValidationSucceedsAndReturnsTrue()
Validates if an active certificate is stored in the database and can be downloaded by the user...
testValidationReturnedFalseBecauseJavaServerIsNotActive()
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
testValidationReturnedFalseBecauseCertificateAreNotGloballyActivated()
Class ilRpcClientException.