diff --git a/tests/Integration/Queue/JobChainingTest.php b/tests/Integration/Queue/JobChainingTest.php index 058a742a2fb2..bc41c7274a62 100644 --- a/tests/Integration/Queue/JobChainingTest.php +++ b/tests/Integration/Queue/JobChainingTest.php @@ -159,8 +159,8 @@ public function testCatchCallbackIsCalledOnFailure() new JobChainingTestFirstJob(), new JobChainingTestFailingJob(), new JobChainingTestSecondJob(), - ])->catch(function () use (&$catchRan) { - static::$catchCallbackRan = true; + ])->catch(function () { + self::$catchCallbackRan = true; })->dispatch(); $this->assertTrue(JobChainingTestFirstJob::$ran);