Skip to content

Commit

Permalink
introducing toBeDigits doc
Browse files Browse the repository at this point in the history
  • Loading branch information
devajmeireles committed Aug 16, 2023
1 parent cba2969 commit 4579d33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions expectations.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ With the Pest expectation API, you have access to an extensive collection of ind
- [`toBeInt()`](#expect-toBeInt)
- [`toBeIterable()`](#expect-toBeIterable)
- [`toBeNumeric()`](#expect-toBeNumeric)
- [`toBeDigits()`](#expect-toBeDigits)
- [`toBeObject()`](#expect-toBeObject)
- [`toBeResource()`](#expect-toBeResource)
- [`toBeScalar()`](#expect-toBeScalar)
Expand Down Expand Up @@ -471,6 +472,17 @@ expect(10)->toBeNumeric();
expect('10')->toBeNumeric();
```

<a name="expect-toBeDigits"></a>
### `toBeDigits()`

This expectation ensures that `$value` contains only digits.

```php
expect($year)->toBeDigits();
expect(15)->toBeDigits();
expect('15')->toBeDigits();
```

<a name="expect-toBeObject"></a>
### `toBeObject()`

Expand Down

0 comments on commit 4579d33

Please sign in to comment.