mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
17 lines
484 B
PHP
17 lines
484 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect('00123')->toEqualCanonicalizing(123);
|
|
expect(['a', 'b', 'c'])->toEqualCanonicalizing(['c', 'a', 'b']);
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect(['a', 'b', 'c'])->toEqualCanonicalizing(['a', 'b']);
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect('042')->not->toEqualCanonicalizing(42);
|
|
})->throws(ExpectationFailedException::class);
|