Merge branch '2.x' into feat/string-case-expectations

This commit is contained in:
Maurizio
2023-08-19 10:28:48 +02:00
7 changed files with 55 additions and 11 deletions

View File

@ -502,6 +502,18 @@ final class Expectation
return $this;
}
/**
* Asserts that the value contains only digits.
*
* @return self<TValue>
*/
public function toBeDigits(string $message = ''): self
{
Assert::assertTrue(ctype_digit((string) $this->value), $message);
return $this;
}
/**
* Asserts that the value is of type object.
*