mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 17:27:22 +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, 2, 3])->toCount(3);
|
||||
expect([1, 2, 3])->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect([1, 2, 3])->toCount(4);
|
||||
expect([1, 2, 3])->toHaveCount(4);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect([1, 2, 3])->not->toCount(3);
|
||||
expect([1, 2, 3])->not->toHaveCount(3);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user