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 /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..
Decoded Output download
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\MailerSend\Tests\Webhook;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Mailer\Bridge\MailerSend\RemoteEvent\MailerSendPayloadConverter;
use Symfony\Component\Mailer\Bridge\MailerSend\Webhook\MailerSendRequestParser;
use Symfony\Component\Webhook\Client\RequestParserInterface;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class MailerSendSignedRequestParserTest extends AbstractRequestParserTestCase
{
protected function createRequestParser(): RequestParserInterface
{
return new MailerSendRequestParser(new MailerSendPayloadConverter());
}
public static function getPayloads(): iterable
{
$filename = 'sent.json';
$currentDir = \dirname((new \ReflectionClass(static::class))->getFileName());
yield $filename => [
file_get_contents($currentDir.'/Fixtures/sent.json'),
include ($currentDir.'/Fixtures/sent.php'),
];
}
protected function getSecret(): string
{
return 'GvLY88Uyj70jQm3fUwYyWmAaiz98wWim';
}
protected function createRequest(string $payload): Request
{
return Request::create(
uri: '/',
method: 'POST',
server: [
'Content-Type' => 'application/json',
'HTTP_Signature' => 'e60f87b019f0aaae29042b14762991765ebb0cd6f6d42884af9fccca4cbd16e7',
],
content: str_replace("
", '', $payload)
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\MailerSend\Tests\Webhook;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Mailer\Bridge\MailerSend\RemoteEvent\MailerSendPayloadConverter;
use Symfony\Component\Mailer\Bridge\MailerSend\Webhook\MailerSendRequestParser;
use Symfony\Component\Webhook\Client\RequestParserInterface;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class MailerSendSignedRequestParserTest extends AbstractRequestParserTestCase
{
protected function createRequestParser(): RequestParserInterface
{
return new MailerSendRequestParser(new MailerSendPayloadConverter());
}
public static function getPayloads(): iterable
{
$filename = 'sent.json';
$currentDir = \dirname((new \ReflectionClass(static::class))->getFileName());
yield $filename => [
file_get_contents($currentDir.'/Fixtures/sent.json'),
include ($currentDir.'/Fixtures/sent.php'),
];
}
protected function getSecret(): string
{
return 'GvLY88Uyj70jQm3fUwYyWmAaiz98wWim';
}
protected function createRequest(string $payload): Request
{
return Request::create(
uri: '/',
method: 'POST',
server: [
'Content-Type' => 'application/json',
'HTTP_Signature' => 'e60f87b019f0aaae29042b14762991765ebb0cd6f6d42884af9fccca4cbd16e7',
],
content: str_replace("\n", '', $payload)
);
}
}
Function Calls
None |
Stats
MD5 | 4ffff2affb7a1f7048e81c52e13cd0e7 |
Eval Count | 0 |
Decode Time | 98 ms |