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\Messenger\Tests\Stamp;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Messenger\Stamp\ValidationStamp;
use Symfony\Component\Validator\Constraints\GroupSequence;
/**
* @author Maxime Steinhausser <[email protected]>
*/
class ValidationStampTest extends TestCase
{
public function testStamp()
{
$stamp = new ValidationStamp($groups = ['Default', 'Extra']);
$this->assertSame($groups, $stamp->getGroups());
$stamp = new ValidationStamp($groups = new GroupSequence(['Default', 'Then']));
$this->assertSame($groups, $stamp->getGroups());
}
public function testSerializable()
{
$this->assertEquals($stamp = new ValidationStamp(['Default', 'Extra']), unserialize(serialize($stamp)));
$this->assertEquals($stamp = new ValidationStamp(new GroupSequence(['Default', 'Then'])), unserialize(serialize($stamp)));
}
}
?>
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\Messenger\Tests\Stamp;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Messenger\Stamp\ValidationStamp;
use Symfony\Component\Validator\Constraints\GroupSequence;
/**
* @author Maxime Steinhausser <[email protected]>
*/
class ValidationStampTest extends TestCase
{
public function testStamp()
{
$stamp = new ValidationStamp($groups = ['Default', 'Extra']);
$this->assertSame($groups, $stamp->getGroups());
$stamp = new ValidationStamp($groups = new GroupSequence(['Default', 'Then']));
$this->assertSame($groups, $stamp->getGroups());
}
public function testSerializable()
{
$this->assertEquals($stamp = new ValidationStamp(['Default', 'Extra']), unserialize(serialize($stamp)));
$this->assertEquals($stamp = new ValidationStamp(new GroupSequence(['Default', 'Then'])), unserialize(serialize($stamp)));
}
}
Function Calls
None |
Stats
MD5 | 80b130890d36ee70fb9088165129de94 |
Eval Count | 0 |
Decode Time | 88 ms |