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

16
tests/Expect/toBeNAN.php Normal file
View File

@ -0,0 +1,16 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect(asin(2))->toBeNan();
expect(log(0))->not->toBeNan();
});
test('failures', function () {
expect(1)->toBeNan();
})->throws(ExpectationFailedException::class);
test('not failures', function () {
expect(acos(1.5))->not->toBeNan();
})->throws(ExpectationFailedException::class);