adds failing test

This commit is contained in:
Fabio Ivona
2021-10-01 15:52:02 +02:00
parent 205238fcbf
commit 3ff71a4563

View File

@ -1,5 +1,7 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
it('gives access the the underlying expectException', function () {
$this->expectException(InvalidArgumentException::class);
@ -37,3 +39,11 @@ it('can just define the message if given condition is true', function () {
it('can just define the message if given condition is 1', function () {
throw new Exception('Something bad happened');
})->throwsIf(1, 'Something bad happened');
it('can handle a skipped test if it is trying to catch an exception', function () {
expect(1)->toBe(2);
})->throws(ExpectationFailedException::class)->skip('this test should be skipped')->only();
it('debug', function () {
expect(2)->toBe(2);
})->skip('this test should be skipped')->only();