Merge pull request #14945 from JKingsnorth/is-public-fixes
[civicrm-core.git] / tests / phpunit / CRM / Core / JobManagerTest.php
index 939247aa6e40b994b67618e4f86b7fb900daa781..3c7913f92c68255f05d65ce498f5f691640a8dbc 100644 (file)
@@ -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'));