@@ -764,22 +764,17 @@ function ($callback) {
764
764
->method ('getCollection ' )->willReturn ($ this ->scheduleCollectionMock );
765
765
$ scheduleMock ->expects ($ this ->any ())
766
766
->method ('getResource ' )->willReturn ($ this ->scheduleResourceMock );
767
- $ this ->scheduleFactoryMock ->expects ($ this ->once (2 ))
767
+ $ this ->scheduleFactoryMock ->expects ($ this ->once ())
768
768
->method ('create ' )->willReturn ($ scheduleMock );
769
769
770
770
$ testCronJob = $ this ->getMockBuilder ('CronJob ' )
771
771
->setMethods (['execute ' ])->getMock ();
772
772
$ testCronJob ->expects ($ this ->atLeastOnce ())->method ('execute ' )->with ($ schedule );
773
773
774
- $ this ->objectManagerMock ->expects (
775
- $ this ->once ()
776
- )->method (
777
- 'create '
778
- )->with (
779
- 'CronJob '
780
- )->willReturn (
781
- $ testCronJob
782
- );
774
+ $ this ->objectManagerMock ->expects ($ this ->once ())
775
+ ->method ('create ' )
776
+ ->with ('CronJob ' )
777
+ ->willReturn ($ testCronJob );
783
778
784
779
$ this ->cronQueueObserver ->execute ($ this ->observerMock );
785
780
}
@@ -1055,26 +1050,11 @@ public function testMissedJobsCleanedInTime()
1055
1050
$ connectionMock ->expects ($ this ->exactly (5 ))
1056
1051
->method ('delete ' )
1057
1052
->withConsecutive (
1058
- [
1059
- $ tableName ,
1060
- ['status = ? ' => 'pending ' , 'job_code in (?) ' => ['test_job1 ' ]]
1061
- ],
1062
- [
1063
- $ tableName ,
1064
- ['status = ? ' => 'success ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]
1065
- ],
1066
- [
1067
- $ tableName ,
1068
- ['status = ? ' => 'missed ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]
1069
- ],
1070
- [
1071
- $ tableName ,
1072
- ['status = ? ' => 'error ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]
1073
- ],
1074
- [
1075
- $ tableName ,
1076
- ['status = ? ' => 'pending ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]
1077
- ]
1053
+ [$ tableName , ['status = ? ' => 'pending ' , 'job_code in (?) ' => ['test_job1 ' ]]],
1054
+ [$ tableName , ['status = ? ' => 'success ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]],
1055
+ [$ tableName , ['status = ? ' => 'missed ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]],
1056
+ [$ tableName , ['status = ? ' => 'error ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]],
1057
+ [$ tableName , ['status = ? ' => 'pending ' , 'job_code in (?) ' => ['test_job1 ' ], 'scheduled_at < ? ' => null ]]
1078
1058
)
1079
1059
->willReturn (1 );
1080
1060
0 commit comments