4
4
* See COPYING.txt for license details.
5
5
*/
6
6
namespace Magento \Cron \Test \Unit \Model ;
7
+
7
8
use Magento \Cron \Model \Schedule ;
9
+
8
10
/**
9
11
* Class \Magento\Cron\Test\Unit\Model\ObserverTest
10
12
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -623,11 +625,9 @@ public function testMissedJobsCleanedInTime()
623
625
)->getMock ();
624
626
$ schedule1 ->expects ($ this ->any ())->method ('getExecutedAt ' )->will ($ this ->returnValue (null ));
625
627
$ schedule1 ->expects ($ this ->any ())->method ('getScheduledAt ' )->will ($ this ->returnValue ('-2 day -1 hour ' ));
626
- $ schedule1 ->expects ($ this ->any ())->method ('getStatus ' )->will (
627
- $ this ->returnValue (Schedule::STATUS_MISSED ));
628
+ $ schedule1 ->expects ($ this ->any ())->method ('getStatus ' )->will ($ this ->returnValue (Schedule::STATUS_MISSED ));
628
629
//we expect this job be deleted from the list
629
- $ schedule1 ->expects ($ this ->once ())->method ('delete ' )->will (
630
- $ this ->returnValue (true ));
630
+ $ schedule1 ->expects ($ this ->once ())->method ('delete ' )->will ($ this ->returnValue (true ));
631
631
632
632
// This item was scheduled 1 day ago
633
633
$ schedule2 = $ this ->getMockBuilder (
@@ -637,8 +637,7 @@ public function testMissedJobsCleanedInTime()
637
637
)->getMock ();
638
638
$ schedule2 ->expects ($ this ->any ())->method ('getExecutedAt ' )->will ($ this ->returnValue (null ));
639
639
$ schedule2 ->expects ($ this ->any ())->method ('getScheduledAt ' )->will ($ this ->returnValue ('-1 day ' ));
640
- $ schedule2 ->expects ($ this ->any ())->method ('getStatus ' )->will (
641
- $ this ->returnValue (Schedule::STATUS_MISSED ));
640
+ $ schedule2 ->expects ($ this ->any ())->method ('getStatus ' )->will ($ this ->returnValue (Schedule::STATUS_MISSED ));
642
641
//we don't expect this job be deleted from the list
643
642
$ schedule2 ->expects ($ this ->never ())->method ('delete ' );
644
643
0 commit comments