mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
20 lines
509 B
PHP
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);
|