mirror of
https://github.com/pestphp/pest.git
synced 2026-04-25 16:37:27 +02:00
Style
This commit is contained in:
@ -4,17 +4,17 @@ use PHPUnit\Framework\Constraint\IsTrue;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect(true)->toMatchConstraint(new IsTrue());
|
||||
expect(true)->toMatchConstraint(new IsTrue);
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect(false)->toMatchConstraint(new IsTrue());
|
||||
expect(false)->toMatchConstraint(new IsTrue);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('failures with custom message', function () {
|
||||
expect(false)->toMatchConstraint(new IsTrue(), 'oh no!');
|
||||
expect(false)->toMatchConstraint(new IsTrue, 'oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('not failures', function () {
|
||||
expect(true)->not->toMatchConstraint(new IsTrue());
|
||||
expect(true)->not->toMatchConstraint(new IsTrue);
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user