File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -205,4 +205,28 @@ public function testGetFirstDayOfYear()
205205 $ jDate = new Jalalian (1393 , 9 , 5 );
206206 $ this ->assertEquals ($ jDate ->getFirstDayOfYear ()->format ('Y-m-d ' ), '1393-01-01 ' );
207207 }
208+
209+ public function testAddDay ()
210+ {
211+ $ jDate = new Jalalian (1401 , 6 , 31 );
212+ $ this ->assertEquals ($ jDate ->addDay ()->format ('Y-m-d ' ), '1401-07-01 ' );
213+ }
214+
215+ public function testSubDay ()
216+ {
217+ $ jDate = new Jalalian (1401 , 6 , 1 );
218+ $ this ->assertEquals ($ jDate ->subDay ()->format ('Y-m-d ' ), '1401-05-31 ' );
219+ }
220+
221+ public function testGetLastWeek ()
222+ {
223+ $ jDate = new Jalalian (1401 , 6 , 8 );
224+ $ this ->assertEquals ($ jDate ->getLastWeek ()->format ('Y-m-d ' ), '1401-06-01 ' );
225+ }
226+
227+ public function testGetLastMonth ()
228+ {
229+ $ jDate = new Jalalian (1401 , 6 , 8 );
230+ $ this ->assertEquals ($ jDate ->getLastMonth ()->format ('Y-m-d ' ), '1401-05-08 ' );
231+ }
208232}
You can’t perform that action at this time.
0 commit comments