mirror of
https://github.com/pestphp/pest.git
synced 2026-07-24 18:40:03 +02:00
fix: package lock fingerprint
This commit is contained in:
@@ -1,23 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect('abc')->toBeCamelCase();
|
||||
expect('abcDef')->toBeCamelCase();
|
||||
expect('abc-def')->not->toBeCamelCase();
|
||||
expect('abc-def')->not->toBeCamelCase();
|
||||
expect('AbcDef')->not->toBeCamelCase();
|
||||
test('pass', function (): void {
|
||||
expect('abc')->toBeCamelCase()
|
||||
->and('abcDef')->toBeCamelCase()
|
||||
->and('abc-def')->not->toBeCamelCase()->not->toBeCamelCase()
|
||||
->and('AbcDef')->not->toBeCamelCase();
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
test('failures', function (): void {
|
||||
expect('Abc')->toBeCamelCase();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('failures with custom message', function () {
|
||||
test('failures with custom message', function (): void {
|
||||
expect('Abc')->toBeCamelCase('oh no!');
|
||||
})->throws(ExpectationFailedException::class, 'oh no!');
|
||||
|
||||
test('not failures', function () {
|
||||
test('not failures', function (): void {
|
||||
expect('abcDef')->not->toBeCamelCase();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
Reference in New Issue
Block a user