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