mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
feat(expect): updates test suite to use expectation api
This commit is contained in:
@ -3,13 +3,13 @@
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect(1.0)->toEqualWithDelta(1.3, .4);
|
||||
expect(1.0)->toBeEqualWithDelta(1.3, .4);
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect(1.0)->toEqualWithDelta(1.5, .1);
|
||||
expect(1.0)->toBeEqualWithDelta(1.5, .1);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect(1.0)->not->toEqualWithDelta(1.6, .7);
|
||||
expect(1.0)->not->toBeEqualWithDelta(1.6, .7);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user