Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | ||
3 | require_once 'CiviTest/CiviUnitTestCase.php'; | |
4 | ||
5 | class CRM_Core_JobManagerTest extends CiviUnitTestCase { | |
6 | ||
7 | function setUp() { | |
8 | parent::setUp(); | |
9 | } | |
10 | ||
11 | function testHookCron() { | |
12 | $hook = $this->getMock('stdClass', array('civicrm_cron')); | |
13 | $hook->expects($this->once()) | |
14 | ->method('civicrm_cron') | |
15 | ->with($this->isInstanceOf('CRM_Core_JobManager')); | |
16 | CRM_Utils_Hook::singleton()->setMock($hook); | |
17 | ||
18 | $jobManager = new CRM_Core_JobManager(); | |
19 | $jobManager->execute(FALSE); | |
20 | } | |
21 | } |