Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php use Pest\Exceptions\InvalidExpectationValue; use PHPUnit\Framework\ExpectationFaile..
Decoded Output download
<?php
use Pest\Exceptions\InvalidExpectationValue;
use PHPUnit\Framework\ExpectationFailedException;
$array = [
'kebab' => true,
'kebab-case' => [
'kebab' => true,
'kebab-case' => [
'kebab' => true,
'kebab-case' => true,
],
'list' => [
'abc',
'def',
'ghi',
],
],
];
test('pass', function () use ($array) {
expect($array)->toHaveKebabCaseKeys();
});
test('failures', function () {
expect('not-an-array')->toHaveKebabCaseKeys();
})->throws(InvalidExpectationValue::class);
test('failures with message', function () use ($array) {
expect($array)->not->toHaveKebabCaseKeys('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () use ($array) {
expect($array)->not->toHaveKebabCaseKeys();
})->throws(ExpectationFailedException::class);
?>
Did this file decode correctly?
Original Code
<?php
use Pest\Exceptions\InvalidExpectationValue;
use PHPUnit\Framework\ExpectationFailedException;
$array = [
'kebab' => true,
'kebab-case' => [
'kebab' => true,
'kebab-case' => [
'kebab' => true,
'kebab-case' => true,
],
'list' => [
'abc',
'def',
'ghi',
],
],
];
test('pass', function () use ($array) {
expect($array)->toHaveKebabCaseKeys();
});
test('failures', function () {
expect('not-an-array')->toHaveKebabCaseKeys();
})->throws(InvalidExpectationValue::class);
test('failures with message', function () use ($array) {
expect($array)->not->toHaveKebabCaseKeys('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () use ($array) {
expect($array)->not->toHaveKebabCaseKeys();
})->throws(ExpectationFailedException::class);
Function Calls
None |
Stats
MD5 | 8a6de7e0486ac75258f3b167cd7f27f3 |
Eval Count | 0 |
Decode Time | 83 ms |