middleware(); expect($mw)->toHaveCount(1) ->and($mw[0])->toBeInstanceOf(WithoutOverlapping::class); }); it('шаг 2 (изучение) и резолв — на той же очереди и защищены от нахлёста', function () { Queue::fake(); RunAutopodborStudyJob::dispatch(7); RunAutopodborResolveJob::dispatch(8); Queue::assertPushedOn('autopodbor', RunAutopodborStudyJob::class); Queue::assertPushedOn('autopodbor', RunAutopodborResolveJob::class); expect((new RunAutopodborStudyJob(7))->middleware()[0])->toBeInstanceOf(WithoutOverlapping::class) ->and((new RunAutopodborResolveJob(8))->middleware()[0])->toBeInstanceOf(WithoutOverlapping::class); });