summaryrefslogtreecommitdiff
path: root/tests/HirdTest.php
diff options
context:
space:
mode:
authorAsko Nomm <asko@bien.ee>2022-02-27 21:15:46 +0100
committerAsko Nomm <asko@bien.ee>2022-02-27 21:15:46 +0100
commit3a7ca1c47a5e1a6820c38dc39e1a129be64ecc93 (patch)
treeb814f5397a81d8e04187d5eb0579bc1c9b877c3e /tests/HirdTest.php
parentdbacaf305b8f4a5792e3d327d3ba98ecf06b04e0 (diff)
Update tests
Diffstat (limited to 'tests/HirdTest.php')
-rw-r--r--tests/HirdTest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/HirdTest.php b/tests/HirdTest.php
index 273eff6..ef217a1 100644
--- a/tests/HirdTest.php
+++ b/tests/HirdTest.php
@@ -14,6 +14,7 @@ test('Validate an incorrect e-mail address', function () {
$fields = ['email' => 'this-is-not-right'];
$rules = ['email' => 'email'];
$hird = new Hird($fields, $rules);
+ $hird->fails();
expect($hird->errors())->toBe([
'email is not a valid e-mail address.'
@@ -32,6 +33,7 @@ test('Validate an incorrect length of string', function () {
$fields = ['string' => 'i-am-short'];
$rules = ['string' => 'len:15'];
$hird = new Hird($fields, $rules);
+ $hird->fails();
expect($hird->errors())->toBe([
'string is shorter than the required 15 characters.'
@@ -60,6 +62,7 @@ test('Validate an incorrect required string', function () {
];
$hird = new Hird($fields, $rules);
+ $hird->fails();
expect($hird->errors())->toBe([
'empty-string is required.',