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