feat: allow string type in gt/lt expectations

This commit is contained in:
Pauls Nartišs
2024-01-05 16:06:54 +02:00
parent dc1e4f040d
commit b1c59ec2e6
6 changed files with 28 additions and 4 deletions

View File

@ -18,6 +18,11 @@ test('passes with DateTime and DateTimeImmutable', function () {
expect($past)->not->toBeGreaterThanOrEqual($now);
});
test('passes with strings', function () {
expect('b')->toBeGreaterThanOrEqual('a');
expect('a')->toBeGreaterThanOrEqual('a');
});
test('failures', function () {
expect(4)->toBeGreaterThanOrEqual(4.1);
})->throws(ExpectationFailedException::class);