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 namespace Alchemy\Zippy\Tests\Resource; use Alchemy\Zippy\Tests\TestCase; use Alch..

Decoded Output download

<?php

namespace Alchemy\Zippy\Tests\Resource;

use Alchemy\Zippy\Tests\TestCase;
use Alchemy\Zippy\Resource\ResourceTeleporter;

class ResourceTeleporterTest extends TestCase
{
    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::__construct
     * @doesNotPerformAssertions
     */
    public function testConstruct()
    {
        $container = $this->getMockBuilder('\Alchemy\Zippy\Resource\TeleporterContainer')
            ->disableOriginalConstructor()
            ->getMock();

        $teleporter = new ResourceTeleporter($container);

        return $teleporter;
    }

    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::teleport
     */
    public function testTeleport()
    {
        $context = 'supa-context';
        $resource = $this->getMockBuilder('\Alchemy\Zippy\Resource\Resource')
            ->disableOriginalConstructor()
            ->getMock();

        $container = $this->getMockBuilder('\Alchemy\Zippy\Resource\TeleporterContainer')
            ->disableOriginalConstructor()
            ->getMock();

        $teleporter = $this->getMockBuilder('\Alchemy\Zippy\Resource\Teleporter\TeleporterInterface')->getMock();
        $teleporter->expects($this->once())
            ->method('teleport')
            ->with($this->equalTo($resource), $this->equalTo($context));

        $container->expects($this->once())
            ->method('fromResource')
            ->with($this->equalTo($resource))
            ->will($this->returnValue($teleporter));

        $resourceTeleporter = new ResourceTeleporter($container);
        $resourceTeleporter->teleport($context, $resource);
    }

    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::create
     */
    public function testCreate()
    {
        $this->assertInstanceOf('Alchemy\Zippy\Resource\ResourceTeleporter', ResourceTeleporter::create());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Alchemy\Zippy\Tests\Resource;

use Alchemy\Zippy\Tests\TestCase;
use Alchemy\Zippy\Resource\ResourceTeleporter;

class ResourceTeleporterTest extends TestCase
{
    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::__construct
     * @doesNotPerformAssertions
     */
    public function testConstruct()
    {
        $container = $this->getMockBuilder('\Alchemy\Zippy\Resource\TeleporterContainer')
            ->disableOriginalConstructor()
            ->getMock();

        $teleporter = new ResourceTeleporter($container);

        return $teleporter;
    }

    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::teleport
     */
    public function testTeleport()
    {
        $context = 'supa-context';
        $resource = $this->getMockBuilder('\Alchemy\Zippy\Resource\Resource')
            ->disableOriginalConstructor()
            ->getMock();

        $container = $this->getMockBuilder('\Alchemy\Zippy\Resource\TeleporterContainer')
            ->disableOriginalConstructor()
            ->getMock();

        $teleporter = $this->getMockBuilder('\Alchemy\Zippy\Resource\Teleporter\TeleporterInterface')->getMock();
        $teleporter->expects($this->once())
            ->method('teleport')
            ->with($this->equalTo($resource), $this->equalTo($context));

        $container->expects($this->once())
            ->method('fromResource')
            ->with($this->equalTo($resource))
            ->will($this->returnValue($teleporter));

        $resourceTeleporter = new ResourceTeleporter($container);
        $resourceTeleporter->teleport($context, $resource);
    }

    /**
     * @covers Alchemy\Zippy\Resource\ResourceTeleporter::create
     */
    public function testCreate()
    {
        $this->assertInstanceOf('Alchemy\Zippy\Resource\ResourceTeleporter', ResourceTeleporter::create());
    }
}

Function Calls

None

Variables

None

Stats

MD5 4fc473d3d0f58f334505f8eaa06e62b2
Eval Count 0
Decode Time 94 ms