feat(expect): add more methods

This commit is contained in:
ceceppa
2020-07-14 08:08:13 +01:00
parent d29c789788
commit 819825bdd2
18 changed files with 419 additions and 30 deletions

19
tests/Expect/toBe.php Normal file
View File

@ -0,0 +1,19 @@
<?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);