Files
pest/tests/Expect/toBe.php
2020-07-14 08:08:13 +01:00

20 lines
446 B
PHP

<?php
use PHPUnit\Framework\ExpectationFailedException;
test('strict comparisons', function () {
$nuno = new stdClass();
$dries = new stdClass();
expect($nuno)->toBe($nuno);
expect($nuno)->not->toBe($dries);
});
test('failures', function () {
expect(1)->toBe(2);
})->throws(ExpectationFailedException::class);
test('not failures', function () {
expect(1)->not->toBe(1);
})->throws(ExpectationFailedException::class);