-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more email validation cases to the testBasic method.
- Loading branch information
1 parent
9b9f91e
commit a27ad10
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,18 @@ public function testBasic() | |
['The '.self::ATTRIBUTE_REPLACED.' must be a valid email address.'] | ||
); | ||
|
||
$this->fails( | ||
Email::default(), | ||
12345, | ||
[Email::class] | ||
); | ||
|
||
$this->fails( | ||
Rule::email(), | ||
12345, | ||
[Email::class] | ||
); | ||
|
||
$this->passes( | ||
Email::default(), | ||
'[email protected]' | ||
|
@@ -43,6 +55,16 @@ public function testBasic() | |
'[email protected]' | ||
); | ||
|
||
$this->passes( | ||
Rule::email(), | ||
['[email protected]'], | ||
); | ||
|
||
$this->passes( | ||
Email::default(), | ||
['[email protected]'], | ||
); | ||
|
||
$this->passes(Email::default(), null); | ||
|
||
$this->passes(Rule::email(), null); | ||
|