mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
21 lines
557 B
PHP
21 lines
557 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect(log(0))->toBeInfinite();
|
|
expect(log(1))->not->toBeInfinite();
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect(asin(2))->toBeInfinite();
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('failures with custom message', function () {
|
|
expect(asin(2))->toBeInfinite('oh no!');
|
|
})->throws(ExpectationFailedException::class, 'oh no!');
|
|
|
|
test('not failures', function () {
|
|
expect(INF)->not->toBeInfinite();
|
|
})->throws(ExpectationFailedException::class);
|