Skip to content

Commit

Permalink
add jalali_date_is_correct_with_different_default_character test
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Jun 2, 2024
1 parent cc916f2 commit cc3c720
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Rules/ValidJalaliDateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,21 @@ public function jalali_date_is_not_string()

$this->assertFalse($passes);
}

/**
* Test jalali date is correct with different default character.
*
* @test
*
* @return void
*/
public function jalali_date_is_correct_with_different_default_character()
{
$rules = ['jalali_date' => [new ValidJalaliDate('-')]];
$data = ['jalali_date' => '1384-8-25'];
$passes = $this->app['validator']->make($data, $rules)->passes();

$this->assertTrue($passes);
}

}

0 comments on commit cc3c720

Please sign in to comment.