chore(expectations): rename 'toMatchRegEx' to 'toMatch'

This commit is contained in:
Owen Voke
2020-09-21 16:02:08 +01:00
parent f76f353c32
commit e3e4815b55
3 changed files with 10 additions and 10 deletions

View File

@ -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);