3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Class CRM_Core_JobManagerTest
16 class CRM_Core_JobManagerTest
extends CiviUnitTestCase
{
18 public function setUp() {
22 public function testHookCron() {
23 $mockFunction = $this->mockMethod
;
24 $hook = $this->getMockBuilder(stdClass
::class)
25 ->setMethods(['civicrm_cron'])
27 $hook->expects($this->once())
28 ->method('civicrm_cron')
29 ->with($this->isInstanceOf('CRM_Core_JobManager'));
30 CRM_Utils_Hook
::singleton()->setMock($hook);
32 $jobManager = new CRM_Core_JobManager();
33 $jobManager->execute(FALSE);