diff --git a/tests/ExtendedTests/Assert.php b/tests/ExtendedTests/Assert.php index 7b7407a..1000e6d 100644 --- a/tests/ExtendedTests/Assert.php +++ b/tests/ExtendedTests/Assert.php @@ -57,4 +57,21 @@ public static function assertIsString($actual, string $message = ''): void static::assertTrue(is_string($actual), $message); } } + + /** + * Asserts that a variable is of type bool. + * + * @throws ExpectationFailedException + * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @psalm-assert bool $actual + */ + public static function assertIsBool($actual, string $message = ''): void + { + if (method_exists(parent::class, 'assertIsBool')) { + parent::assertIsBool($actual, $message); + } else { + static::assertTrue(is_bool($actual), $message); + } + } }