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; beforeEach(function () { $th..
Decoded Output download
<?php
use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
$this->times = [new DateTimeImmutable(), new DateTimeImmutable()];
});
test('pass', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTimeImmutable::class);
expect($this->times)->not->toContainOnlyInstancesOf(DateTime::class);
});
test('failures', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTime::class);
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTime::class, 'oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect($this->times)->not->toContainOnlyInstancesOf(DateTimeImmutable::class);
})->throws(ExpectationFailedException::class);
?>
Did this file decode correctly?
Original Code
<?php
use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
$this->times = [new DateTimeImmutable(), new DateTimeImmutable()];
});
test('pass', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTimeImmutable::class);
expect($this->times)->not->toContainOnlyInstancesOf(DateTime::class);
});
test('failures', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTime::class);
})->throws(ExpectationFailedException::class);
test('failures with custom message', function () {
expect($this->times)->toContainOnlyInstancesOf(DateTime::class, 'oh no!');
})->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect($this->times)->not->toContainOnlyInstancesOf(DateTimeImmutable::class);
})->throws(ExpectationFailedException::class);
Function Calls
None |
Stats
MD5 | 1ef136df9214ddbee6930649b3c811d4 |
Eval Count | 0 |
Decode Time | 65 ms |