From 7f972bd369843080f0be47f16c016993e4220480 Mon Sep 17 00:00:00 2001 From: Thai Nguyen Hung Date: Wed, 23 Aug 2023 17:07:55 +0700 Subject: [PATCH] chore: `toHaveSameSize` expectation usage --- expectations.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/expectations.md b/expectations.md index f6ea80a..336a876 100644 --- a/expectations.md +++ b/expectations.md @@ -104,6 +104,7 @@ With the Pest expectation API, you have access to an extensive collection of ind - [`toHaveKebabCaseKeys`](#expect-toHaveKebabCaseKeys) - [`toHaveCamelCaseKeys`](#expect-toHaveCamelCaseKeys) - [`toHaveStudlyCaseKeys`](#expect-toHaveStudlyCaseKeys) +- [`toHaveSameSize`](#expect-toHaveSameSize) @@ -797,6 +798,15 @@ This expectation ensures that `$value` only contains an array with keys in Studl expect(['StudlyCase' => 'abc123'])->toHaveStudlyCaseKeys(); ``` + +### `toHaveSameSize()` + +This expectation ensures that the size of `$value` and the provided iterable are the same. + +```php +expect(['foo', 'bar'])->toHaveSameSize(['baz', 'bazz']); +``` + ---