Merge branch '2.x' into feat/string-case-expectations

This commit is contained in:
Maurizio
2023-08-19 10:28:48 +02:00
7 changed files with 55 additions and 11 deletions

View File

@ -338,6 +338,12 @@
✓ pass
✓ failures
✓ failures with custom message
✓ not failures
PASS Tests\Features\Expect\toBeDigits
✓ pass
✓ failures
✓ failures with custom message
✓ not failures
PASS Tests\Features\Expect\toBeDirectory
@ -1240,4 +1246,4 @@
WARN Tests\Visual\Version
- visual snapshot of help command output
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 878 passed (2013 assertions)
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 882 passed (2022 assertions)

View File

@ -0,0 +1,20 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect('123')->toBeDigits();
expect('123.14')->not->toBeDigits();
});
test('failures', function () {
expect('123.14')->toBeDigits();
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect('123.14')->toBeDigits('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect('445')->not->toBeDigits();
})->throws(ExpectationFailedException::class);

View File

@ -16,7 +16,7 @@ $run = function () {
test('parallel', function () use ($run) {
expect($run('--exclude-group=integration'))
->toContain('Tests: 1 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 15 skipped, 867 passed (1998 assertions)')
->toContain('Tests: 1 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 15 skipped, 871 passed (2007 assertions)')
->toContain('Parallel: 3 processes');
})->skipOnWindows();