diff --git a/expectations.md b/expectations.md index 8a9d182..1201a1f 100644 --- a/expectations.md +++ b/expectations.md @@ -105,6 +105,7 @@ With the Pest expectation API, you have access to an extensive collection of ind - [`toHaveCamelCaseKeys()`](#expect-toHaveCamelCaseKeys) - [`toHaveStudlyCaseKeys()`](#expect-toHaveStudlyCaseKeys) - [`toHaveSameSize()`](#expect-toHaveSameSize) +- [`toBeEmail()`](#expect-toBeEmail) - [`toBeUrl()`](#expect-toBeUrl) - [`toBeUuid()`](#expect-toBeUuid) @@ -821,6 +822,15 @@ This expectation ensures that the size of `$value` and the provided iterable are expect(['foo', 'bar'])->toHaveSameSize(['baz', 'bazz']); ``` + +### `toBeEmail()` + +This expectation ensures that `$value` is a valid email address. + +```php +expect('user@example.com')->toBeEmail(); +``` + ### `toBeUrl()`