Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
b6708aeb | 2 | /* |
3 | +--------------------------------------------------------------------+ | |
7d61e75f TO |
4 | | Copyright CiviCRM LLC. All rights reserved. | |
5 | | | | |
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 | +--------------------------------------------------------------------+ | |
e70a7fc0 | 10 | */ |
6a488035 | 11 | |
e9479dcf EM |
12 | /** |
13 | * Class CRM_Core_JobManagerTest | |
acb109b7 | 14 | * @group headless |
e9479dcf | 15 | */ |
6a488035 TO |
16 | class CRM_Core_JobManagerTest extends CiviUnitTestCase { |
17 | ||
00be9182 | 18 | public function setUp() { |
6a488035 TO |
19 | parent::setUp(); |
20 | } | |
b6708aeb | 21 | |
00be9182 | 22 | public function testHookCron() { |
dcadbba4 | 23 | $mockFunction = $this->mockMethod; |
300a1f99 SL |
24 | $hook = $this->getMockBuilder(stdClass::class) |
25 | ->setMethods(['civicrm_cron']) | |
26 | ->getMock(); | |
6a488035 TO |
27 | $hook->expects($this->once()) |
28 | ->method('civicrm_cron') | |
29 | ->with($this->isInstanceOf('CRM_Core_JobManager')); | |
30 | CRM_Utils_Hook::singleton()->setMock($hook); | |
31 | ||
32 | $jobManager = new CRM_Core_JobManager(); | |
33 | $jobManager->execute(FALSE); | |
34 | } | |
96025800 | 35 | |
6a488035 | 36 | } |