Skip to content

Commit cc3c720

Browse files
committed
add jalali_date_is_correct_with_different_default_character test
1 parent cc916f2 commit cc3c720

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Rules/ValidJalaliDateTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,21 @@ public function jalali_date_is_not_string()
6262

6363
$this->assertFalse($passes);
6464
}
65+
66+
/**
67+
* Test jalali date is correct with different default character.
68+
*
69+
* @test
70+
*
71+
* @return void
72+
*/
73+
public function jalali_date_is_correct_with_different_default_character()
74+
{
75+
$rules = ['jalali_date' => [new ValidJalaliDate('-')]];
76+
$data = ['jalali_date' => '1384-8-25'];
77+
$passes = $this->app['validator']->make($data, $rules)->passes();
78+
79+
$this->assertTrue($passes);
80+
}
81+
6582
}

0 commit comments

Comments
 (0)