Files
pest/tests/Features/Expect/toBeFalse.php
2022-09-19 09:03:27 +02:00

20 lines
509 B
PHP

<?php
use PHPUnit\Framework\ExpectationFailedException;
test('strict comparisons', function () {
expect(false)->toBeFalse();
});
test('failures', function () {
expect('')->toBeFalse();
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect('')->toBeFalse('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect(false)->not->toBe(false);
})->throws(ExpectationFailedException::class);