mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
chore(expectations): rename 'toMatchRegEx' to 'toMatch'
This commit is contained in:
@ -195,6 +195,11 @@
|
||||
PASS Tests\Expect\toHaveProperty
|
||||
✓ pass
|
||||
✓ failures
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Expect\toMatch
|
||||
✓ pass
|
||||
✓ failures
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Expect\toMatchConstraint
|
||||
@ -205,11 +210,6 @@
|
||||
PASS Tests\Expect\toMatchObject
|
||||
✓ pass
|
||||
✓ failures
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Expect\toMatchRegEx
|
||||
✓ pass
|
||||
✓ failures
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Expect\toStartWith
|
||||
@ -383,5 +383,5 @@
|
||||
✓ depends with defined arguments
|
||||
✓ depends run test only once
|
||||
|
||||
Tests: 6 skipped, 223 passed
|
||||
Tests: 6 skipped, 226 passed
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect('Hello World')->toMatchRegEx('/^hello wo.*$/i');
|
||||
expect('Hello World')->toMatch('/^hello wo.*$/i');
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect('Hello World')->toMatchRegEx('/^hello$/i');
|
||||
expect('Hello World')->toMatch('/^hello$/i');
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect('Hello World')->not->toMatchRegEx('/^hello wo.*$/i');
|
||||
expect('Hello World')->not->toMatch('/^hello wo.*$/i');
|
||||
})->throws(ExpectationFailedException::class);
|
||||
Reference in New Issue
Block a user