@@ -693,6 +693,23 @@ public function testDeleteInvalidationsForDeletedSites()
693
693
], $ invalidations );
694
694
}
695
695
696
+ public function testGetInvalidationsInProgress ()
697
+ {
698
+ $ this ->insertInvalidations ([
699
+ ['idsite ' => 1 , 'date1 ' => '2014-02-01 ' , 'date2 ' => '2014-02-28 ' , 'period ' => 2 , 'name ' => 'done ' ],
700
+ ['idsite ' => 1 , 'date1 ' => '2014-02-01 ' , 'date2 ' => '2014-02-01 ' , 'period ' => 1 , 'name ' => 'doneb321434abb5a139c17dadf08c9d2e315 ' , 'ts_started ' => '2014-02-03 23:13:00 ' , 'status ' => 1 ],
701
+ ['idsite ' => 1 , 'date1 ' => '2014-02-03 ' , 'date2 ' => '2014-02-03 ' , 'period ' => 1 , 'name ' => 'done ' , 'ts_started ' => '2014-02-03 23:00:00 ' , 'status ' => 1 ],
702
+ ['idsite ' => 1 , 'date1 ' => '2014-02-01 ' , 'date2 ' => '2014-02-01 ' , 'period ' => 1 , 'name ' => 'done ' ],
703
+ ]);
704
+
705
+ $ expectedInvalidations = [
706
+ ['idsite ' => 1 , 'date1 ' => '2014-02-03 ' , 'date2 ' => '2014-02-03 ' , 'period ' => 1 , 'name ' => 'done ' , 'ts_started ' => '2014-02-03 23:00:00 ' ],
707
+ ['idsite ' => 1 , 'date1 ' => '2014-02-01 ' , 'date2 ' => '2014-02-01 ' , 'period ' => 1 , 'name ' => 'doneb321434abb5a139c17dadf08c9d2e315 ' , 'ts_started ' => '2014-02-03 23:13:00 ' ],
708
+ ];
709
+
710
+ self ::assertEquals ($ expectedInvalidations , $ this ->model ->getInvalidationsInProgress (1 ));
711
+ }
712
+
696
713
private function insertArchiveData ($ archivesToInsert )
697
714
{
698
715
$ idarchive = 1 ;
0 commit comments