Files
pest/tests/Expect/toCount.php
2020-07-13 17:27:55 +01:00

16 lines
361 B
PHP

<?php
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect([1, 2, 3])->toCount(3);
});
test('failures', function () {
expect([1, 2, 3])->toCount(4);
})->throws(ExpectationFailedException::class);
test('not failures', function () {
expect([1, 2, 3])->not->toCount(3);
})->throws(ExpectationFailedException::class);