ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCertificateTestTemplateDeleteActionTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
9  public function testDelete()
10  {
11  $deleteAction = $this->getMockBuilder('ilCertificateDeleteAction')
12  ->getMock();
13 
14  $deleteAction
15  ->expects($this->once())
16  ->method('delete');
17 
18  $objectHelper = $this->getMockBuilder('ilCertificateObjectHelper')
19  ->getMock();
20 
21  $object = $this->getMockBuilder('ilObjTest')
22  ->disableOriginalConstructor()
23  ->getMock();
24 
25  $object
26  ->expects($this->never())
27  ->method('saveCertificateVisibility');
28 
29  $objectHelper->method('getInstanceByObjId')
30  ->willReturn($object);
31 
33  $deleteAction,
34  $objectHelper
35  );
36 
37  $action->delete(100, 200, 'v5.4.0');
38  }
39 }
$action
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.