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 PHPUnit\Framework\ExpectationFailedException; $resource = tmpfile(); afterAll..
Decoded Output download
<?php
use PHPUnit\Framework\ExpectationFailedException;
$resource = tmpfile();
afterAll(function () use ($resource) {
fclose($resource);
});
test('pass', function () use ($resource) {
expect($resource)->toBeResource();
expect(null)->not->toBeResource();
});
test('failures', function () {
expect(null)->toBeResource();
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect(null)->toBeResource('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () use ($resource) {
expect($resource)->not->toBeResource();
})->throws(ExpectationFailedException::class);
?>
Did this file decode correctly?
Original Code
<?php
use PHPUnit\Framework\ExpectationFailedException;
$resource = tmpfile();
afterAll(function () use ($resource) {
fclose($resource);
});
test('pass', function () use ($resource) {
expect($resource)->toBeResource();
expect(null)->not->toBeResource();
});
test('failures', function () {
expect(null)->toBeResource();
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect(null)->toBeResource('oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () use ($resource) {
expect($resource)->not->toBeResource();
})->throws(ExpectationFailedException::class);
Function Calls
None |
Stats
MD5 | d9ecc57e3734662479c84094a6ed0dfe |
Eval Count | 0 |
Decode Time | 90 ms |