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\Security\Core\Tests\User;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\User\ChainUserChecker;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;

final class ChainUserCheckerTest extends TestCase
{
    public function testForwardsPreAuthToAllUserCheckers()
    {
        $user = $this->createMock(UserInterface::class);

        $checker1 = $this->createMock(UserCheckerInterface::class);
        $checker1->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        $checker2 = $this->createMock(UserCheckerInterface::class);
        $checker2->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        $checker3 = $this->createMock(UserCheckerInterface::class);
        $checker3->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        (new ChainUserChecker([$checker1, $checker2, $checker3]))->checkPreAuth($user);
    }

    public function testForwardsPostAuthToAllUserCheckers()
    {
        $user = $this->createMock(UserInterface::class);

        $checker1 = $this->createMock(UserCheckerInterface::class);
        $checker1->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        $checker2 = $this->createMock(UserCheckerInterface::class);
        $checker2->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        $checker3 = $this->createMock(UserCheckerInterface::class);
        $checker3->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        (new ChainUserChecker([$checker1, $checker2, $checker3]))->checkPostAuth($user);
    }
}
 ?>

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\Security\Core\Tests\User;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\User\ChainUserChecker;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;

final class ChainUserCheckerTest extends TestCase
{
    public function testForwardsPreAuthToAllUserCheckers()
    {
        $user = $this->createMock(UserInterface::class);

        $checker1 = $this->createMock(UserCheckerInterface::class);
        $checker1->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        $checker2 = $this->createMock(UserCheckerInterface::class);
        $checker2->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        $checker3 = $this->createMock(UserCheckerInterface::class);
        $checker3->expects($this->once())
            ->method('checkPreAuth')
            ->with($user);

        (new ChainUserChecker([$checker1, $checker2, $checker3]))->checkPreAuth($user);
    }

    public function testForwardsPostAuthToAllUserCheckers()
    {
        $user = $this->createMock(UserInterface::class);

        $checker1 = $this->createMock(UserCheckerInterface::class);
        $checker1->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        $checker2 = $this->createMock(UserCheckerInterface::class);
        $checker2->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        $checker3 = $this->createMock(UserCheckerInterface::class);
        $checker3->expects($this->once())
            ->method('checkPostAuth')
            ->with($user);

        (new ChainUserChecker([$checker1, $checker2, $checker3]))->checkPostAuth($user);
    }
}

Function Calls

None

Variables

None

Stats

MD5 88b7f21b66ea7bcaf4aadd73b9fc8b47
Eval Count 0
Decode Time 96 ms