feat(expectations): add toStartWith

This commit is contained in:
Owen Voke
2020-09-16 08:20:00 +01:00
parent 1567923cda
commit cad8a41e6d
2 changed files with 25 additions and 0 deletions

View File

@ -158,6 +158,16 @@ final class Expectation
return $this;
}
/**
* Asserts that the value starts with $expected.
*/
public function toStartWith(string $expected): Expectation
{
Assert::assertStringStartsWith($expected, $this->value);
return $this;
}
/**
* Asserts that $count matches the number of elements of the value.
*/