mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
chore: resolve toHaveSameSize parameter
This commit is contained in:
@ -6,6 +6,7 @@ namespace Pest\Mixins;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Closure;
|
||||
use Countable;
|
||||
use DateTimeInterface;
|
||||
use Error;
|
||||
use InvalidArgumentException;
|
||||
@ -275,10 +276,10 @@ final class Expectation
|
||||
/**
|
||||
* Asserts that the size of the value and $expected are the same.
|
||||
*
|
||||
* @param array<int|string, mixed> $expected
|
||||
* @param Countable|iterable<mixed> $expected
|
||||
* @return self<TValue>
|
||||
*/
|
||||
public function toHaveSameSize(iterable $expected, string $message = ''): self
|
||||
public function toHaveSameSize(Countable|iterable $expected, string $message = ''): self
|
||||
{
|
||||
if (! is_countable($this->value) && ! is_iterable($this->value)) {
|
||||
InvalidExpectationValue::expected('countable|iterable');
|
||||
|
||||
Reference in New Issue
Block a user