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 /* (c) Anton Medvedev <[email protected]> * * For the full copyright and license infor..

Decoded Output download

<?php
/* (c) Anton Medvedev <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Deployer\Task;

use Deployer\Configuration\Configuration;
use Deployer\Host\Host;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ContextTest extends TestCase
{
    public function testContext()
    {
        $host = $this->getMockBuilder(Host::class)->disableOriginalConstructor()->getMock();
        $host
            ->expects($this->once())
            ->method('config')
            ->willReturn($this->createMock(Configuration::class));

        $context = new Context($host);

        $this->assertInstanceOf(Host::class, $context->getHost());
        $this->assertInstanceOf(Configuration::class, $context->getConfig());

        Context::push($context);

        $this->assertEquals($context, Context::get());
        $this->assertEquals($context, Context::pop());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/* (c) Anton Medvedev <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Deployer\Task;

use Deployer\Configuration\Configuration;
use Deployer\Host\Host;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ContextTest extends TestCase
{
    public function testContext()
    {
        $host = $this->getMockBuilder(Host::class)->disableOriginalConstructor()->getMock();
        $host
            ->expects($this->once())
            ->method('config')
            ->willReturn($this->createMock(Configuration::class));

        $context = new Context($host);

        $this->assertInstanceOf(Host::class, $context->getHost());
        $this->assertInstanceOf(Configuration::class, $context->getConfig());

        Context::push($context);

        $this->assertEquals($context, Context::get());
        $this->assertEquals($context, Context::pop());
    }
}

Function Calls

None

Variables

None

Stats

MD5 882b65e6dd69279800f0104b94dbdf7f
Eval Count 0
Decode Time 85 ms