mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 09:47:23 +01:00
chore: style changes
This commit is contained in:
@ -3,18 +3,18 @@
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect(new Exception())->toBeInstanceOf(Exception::class);
|
||||
expect(new Exception())->not->toBeInstanceOf(RuntimeException::class);
|
||||
expect(new Exception)->toBeInstanceOf(Exception::class);
|
||||
expect(new Exception)->not->toBeInstanceOf(RuntimeException::class);
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect(new Exception())->toBeInstanceOf(RuntimeException::class);
|
||||
expect(new Exception)->toBeInstanceOf(RuntimeException::class);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('failures with custom message', function () {
|
||||
expect(new Exception())->toBeInstanceOf(RuntimeException::class, 'oh no!');
|
||||
expect(new Exception)->toBeInstanceOf(RuntimeException::class, 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('not failures', function () {
|
||||
expect(new Exception())->not->toBeInstanceOf(Exception::class);
|
||||
expect(new Exception)->not->toBeInstanceOf(Exception::class);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user