Merge pull request #14945 from JKingsnorth/is-public-fixes
[civicrm-core.git] / tests / phpunit / CRM / Core / JobManagerTest.php
index 3bc01e4d13acea8c7c907c0b0896f8d4796af6c6..3c7913f92c68255f05d65ce498f5f691640a8dbc 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
 | CiviCRM version 5                                                  |
 +--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2018                                |
+| Copyright CiviCRM LLC (c) 2004-2019                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
@@ -37,7 +37,9 @@ class CRM_Core_JobManagerTest extends CiviUnitTestCase {
 
   public function testHookCron() {
     $mockFunction = $this->mockMethod;
-    $hook = $this->$mockFunction('stdClass', array('civicrm_cron'));
+    $hook = $this->getMockBuilder(stdClass::class)
+      ->setMethods(['civicrm_cron'])
+      ->getMock();
     $hook->expects($this->once())
       ->method('civicrm_cron')
       ->with($this->isInstanceOf('CRM_Core_JobManager'));