ILIAS  trunk Revision v12.0_alpha-1541-g23eaa5e013d
ilCertificateTemplateDeleteActionTest Class Reference
+ Inheritance diagram for ilCertificateTemplateDeleteActionTest:
+ Collaboration diagram for ilCertificateTemplateDeleteActionTest:

Public Member Functions

 testDeleteTemplateAndUseOldThumbnail ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilCertificateBaseTestCase
 setUp ()
 
 tearDown ()
 
 assertDoesNotThrow (callable $cb, string $message='')
 
 assertThrows (callable $cb, ?string $expected_class=null, ?string $expected_message=null)
 @template T of Throwable More...
 
 setGlobalVariable (string $name, mixed $value)
 
- Protected Attributes inherited from ilCertificateBaseTestCase
Container $dic
 

Detailed Description

Definition at line 21 of file ilCertificateTemplateDeleteActionTest.php.

Member Function Documentation

◆ testDeleteTemplateAndUseOldThumbnail()

ilCertificateTemplateDeleteActionTest::testDeleteTemplateAndUseOldThumbnail ( )

Definition at line 23 of file ilCertificateTemplateDeleteActionTest.php.

23 : void
24 {
25 $templateRepositoryMock = $this->getMockBuilder(ilCertificateTemplateRepository::class)
26 ->disableOriginalConstructor()
27 ->getMock();
28
29 $templateRepositoryMock
30 ->expects($this->once())
31 ->method('deleteTemplate')
32 ->with(100, 2000);
33
34 $templateRepositoryMock->expects($this->once())->method('save');
35
36 $objectHelper = $this->getMockBuilder(ilCertificateObjectHelper::class)
37 ->getMock();
38
39 $objectHelper->method('lookUpType')
40 ->willReturn('crs');
41
43 $templateRepositoryMock,
44 'v5.4.0',
45 $objectHelper
46 );
47
48 $action->delete(100, 2000);
49 }

The documentation for this class was generated from the following file: