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 declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Ber..

Decoded Output download

<?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use function assert;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\TestProxyFixture;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-proxy')]
#[Medium]
#[TestDox('createTestProxy()')]
#[IgnorePhpunitDeprecations]
final class CreateTestProxyTest extends TestCase
{
    public function testCreatesTestProxyForExtendableClass(): void
    {
        $proxy = $this->createTestProxy(TestProxyFixture::class);

        $proxy->expects($this->once())
            ->method('returnString');

        assert($proxy instanceof MockObject);
        assert($proxy instanceof TestProxyFixture);

        $this->assertSame('result', $proxy->returnString());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php declare(strict_types=1);
/*
 * This file is part of PHPUnit.
 *
 * (c) Sebastian Bergmann <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace PHPUnit\Framework\MockObject;

use function assert;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations;
use PHPUnit\Framework\Attributes\Medium;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\TestProxyFixture;

#[Group('test-doubles')]
#[Group('test-doubles/creation')]
#[Group('test-doubles/test-proxy')]
#[Medium]
#[TestDox('createTestProxy()')]
#[IgnorePhpunitDeprecations]
final class CreateTestProxyTest extends TestCase
{
    public function testCreatesTestProxyForExtendableClass(): void
    {
        $proxy = $this->createTestProxy(TestProxyFixture::class);

        $proxy->expects($this->once())
            ->method('returnString');

        assert($proxy instanceof MockObject);
        assert($proxy instanceof TestProxyFixture);

        $this->assertSame('result', $proxy->returnString());
    }
}

Function Calls

None

Variables

None

Stats

MD5 ba90906bfa1982cfe8a14f8554c6f0bb
Eval Count 0
Decode Time 77 ms