mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
feat(expect): add more methods
This commit is contained in:
16
tests/Expect/toBeBool.php
Normal file
16
tests/Expect/toBeBool.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect(true)->toBeBool();
|
||||
expect(0)->not->toBeBool();
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect(null)->toBeBool();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect(false)->not->toBeBool();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
Reference in New Issue
Block a user