add toBeIn

This commit is contained in:
freek
2021-07-28 00:36:43 +02:00
parent 6309e6818d
commit 5f574ded81
2 changed files with 21 additions and 0 deletions

View File

@ -371,6 +371,16 @@ final class Expectation
return $this;
}
/**
* Asserts that the value is one of the given values.
*/
public function toBeIn(array $possibleValues): Expectation
{
Assert::assertContains($this->value, $possibleValues);
return $this;
}
/**
* Asserts that the value is infinite.
*/