@@ -143,6 +143,8 @@ protected function setUp()
143
143
$ this ->lockManagerMock = $ this ->getMockBuilder (\Magento \Framework \Lock \LockManagerInterface::class)
144
144
->disableOriginalConstructor ()
145
145
->getMock ();
146
+ $ this ->lockManagerMock ->method ('acquireLock ' )->willReturn (true );
147
+ $ this ->lockManagerMock ->method ('releaseLock ' )->willReturn (true );
146
148
147
149
$ this ->observer = $ this ->createMock (\Magento \Framework \Event \Observer::class);
148
150
@@ -823,22 +825,22 @@ public function testMissedJobsCleanedInTime()
823
825
$ this ->_config ->expects ($ this ->exactly (2 ))->method ('getJobs ' )->will ($ this ->returnValue ($ jobConfig ));
824
826
825
827
$ this ->_scopeConfig ->expects ($ this ->at (0 ))->method ('getValue ' )
828
+ ->with ($ this ->equalTo ('system/cron/test_group/use_separate_process ' ))
829
+ ->will ($ this ->returnValue (0 ));
830
+ $ this ->_scopeConfig ->expects ($ this ->at (1 ))->method ('getValue ' )
826
831
->with ($ this ->equalTo ('system/cron/test_group/history_cleanup_every ' ))
827
832
->will ($ this ->returnValue (10 ));
828
- $ this ->_scopeConfig ->expects ($ this ->at (1 ))->method ('getValue ' )
833
+ $ this ->_scopeConfig ->expects ($ this ->at (2 ))->method ('getValue ' )
829
834
->with ($ this ->equalTo ('system/cron/test_group/schedule_lifetime ' ))
830
835
->will ($ this ->returnValue (2 *24 *60 ));
831
- $ this ->_scopeConfig ->expects ($ this ->at (2 ))->method ('getValue ' )
832
- ->with ($ this ->equalTo ('system/cron/test_group/history_success_lifetime ' ))
833
- ->will ($ this ->returnValue (0 ));
834
836
$ this ->_scopeConfig ->expects ($ this ->at (3 ))->method ('getValue ' )
835
- ->with ($ this ->equalTo ('system/cron/test_group/history_failure_lifetime ' ))
837
+ ->with ($ this ->equalTo ('system/cron/test_group/history_success_lifetime ' ))
836
838
->will ($ this ->returnValue (0 ));
837
839
$ this ->_scopeConfig ->expects ($ this ->at (4 ))->method ('getValue ' )
838
- ->with ($ this ->equalTo ('system/cron/test_group/schedule_generate_every ' ))
840
+ ->with ($ this ->equalTo ('system/cron/test_group/history_failure_lifetime ' ))
839
841
->will ($ this ->returnValue (0 ));
840
842
$ this ->_scopeConfig ->expects ($ this ->at (5 ))->method ('getValue ' )
841
- ->with ($ this ->equalTo ('system/cron/test_group/use_separate_process ' ))
843
+ ->with ($ this ->equalTo ('system/cron/test_group/schedule_generate_every ' ))
842
844
->will ($ this ->returnValue (0 ));
843
845
844
846
$ this ->_collection ->expects ($ this ->any ())->method ('addFieldToFilter ' )->will ($ this ->returnSelf ());
0 commit comments