mirror of
https://github.com/pestphp/pest.git
synced 2026-03-05 23:37:22 +01:00
17 lines
451 B
PHP
17 lines
451 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\Constraint\IsTrue;
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect(true)->toMatchConstraint(new IsTrue());
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect(false)->toMatchConstraint(new IsTrue());
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect(true)->not->toMatchConstraint(new IsTrue());
|
|
})->throws(ExpectationFailedException::class);
|