From 300a1f9999715d095449a2521d88dcbaec68fa98 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 25 May 2019 11:39:43 +1000 Subject: [PATCH] [NFC] Fix issue with Job Manager Test giving out a warning --- tests/phpunit/CRM/Core/JobManagerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Core/JobManagerTest.php b/tests/phpunit/CRM/Core/JobManagerTest.php index 939247aa6e..3c7913f92c 100644 --- a/tests/phpunit/CRM/Core/JobManagerTest.php +++ b/tests/phpunit/CRM/Core/JobManagerTest.php @@ -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')); -- 2.25.1