@@ 59-63 (lines=5) @@ | ||
56 | ||
57 | $repository->expects(self::once())->method('findScheduledJobToReschedule')->willReturn($scheduledJob); |
|
58 | $em->expects(self::once())->method('persist')->with(self::equalTo($expectedActionJob)); |
|
59 | } else { |
|
60 | // expecting the new one |
|
61 | $repository->expects(self::once())->method('findScheduledJobToReschedule')->willReturn(null); |
|
62 | $this->configureEmToExpectNewJobCreation($em, $action, $workflowContext, $executeJobAfter); |
|
63 | } |
|
64 | } else { |
|
65 | // non-reschedulable action - expecting creation of the new job |
|
66 | $repository->expects(self::never())->method('findScheduledJobToReschedule')->willReturn(null); |
|
@@ 64-68 (lines=5) @@ | ||
61 | $repository->expects(self::once())->method('findScheduledJobToReschedule')->willReturn(null); |
|
62 | $this->configureEmToExpectNewJobCreation($em, $action, $workflowContext, $executeJobAfter); |
|
63 | } |
|
64 | } else { |
|
65 | // non-reschedulable action - expecting creation of the new job |
|
66 | $repository->expects(self::never())->method('findScheduledJobToReschedule')->willReturn(null); |
|
67 | $this->configureEmToExpectNewJobCreation($em, $action, $workflowContext, $executeJobAfter); |
|
68 | } |
|
69 | ||
70 | $scheduler = new ActionScheduler($em, $this->getMock(LoggerInterface::class)); |
|
71 | $scheduler->scheduleAction($workflowContext, $action); |