11 $templateRepositoryMock = $this->getMockBuilder(
'ilCertificateTemplateRepository')
12 ->disableOriginalConstructor()
15 $templateRepositoryMock
16 ->method(
'deleteTemplate')
19 $templateRepositoryMock->method(
'activatePreviousCertificate')
31 'samples/background.jpg' 34 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
38 ->expects($this->
once())
39 ->method(
'convertImage');
41 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
44 $objectHelper->method(
'lookUpType')
48 $templateRepositoryMock,
60 $templateRepositoryMock = $this->getMockBuilder(
'ilCertificateTemplateRepository')
61 ->disableOriginalConstructor()
64 $templateRepositoryMock
65 ->method(
'deleteTemplate')
68 $templateRepositoryMock->method(
'activatePreviousCertificate')
82 $utilHelper = $this->getMockBuilder(
'ilCertificateUtilHelper')
86 ->expects($this->
once())
87 ->method(
'convertImage');
89 $objectHelper = $this->getMockBuilder(
'ilCertificateObjectHelper')
92 $objectHelper->method(
'lookUpType')
96 $templateRepositoryMock,
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
testDeleteTemplateAndUseOldThumbnail()
testDeleteTemplateButNoThumbnailWillBeCopiedFromOldCertificate()