mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
17 lines
381 B
PHP
17 lines
381 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect(1.0)->toBeFloat();
|
|
expect(1)->not->toBeFloat();
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect(42)->toBeFloat();
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect(log(3))->not->toBeFloat();
|
|
})->throws(ExpectationFailedException::class);
|