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 reliforp/reli-prof package. * * (c) sji <sji@sj-i..
Decoded Output download
<?php
/**
* This file is part of the reliforp/reli-prof package.
*
* (c) sji <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Reli\Inspector\TargetProcess;
use Reli\BaseTestCase;
use Reli\Inspector\Settings\TargetProcessSettings\TargetProcessSettings;
use Reli\Lib\Process\Exec\TraceeExecutor;
class TargetProcessResolverTest extends BaseTestCase
{
public function testResolve()
{
$tracee_executor = \Mockery::mock(TraceeExecutor::class);
$resolver = new TargetProcessResolver($tracee_executor);
$process_specifier = $resolver->resolve(new TargetProcessSettings(123));
$this->assertSame(123, $process_specifier->pid);
$tracee_executor->expects()->execute('command', ['arg1', 'arg2'])->andReturns(456);
$process_specifier = $resolver->resolve(
new TargetProcessSettings(null, 'command', ['arg1', 'arg2'])
);
$this->assertSame(456, $process_specifier->pid);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file is part of the reliforp/reli-prof package.
*
* (c) sji <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Reli\Inspector\TargetProcess;
use Reli\BaseTestCase;
use Reli\Inspector\Settings\TargetProcessSettings\TargetProcessSettings;
use Reli\Lib\Process\Exec\TraceeExecutor;
class TargetProcessResolverTest extends BaseTestCase
{
public function testResolve()
{
$tracee_executor = \Mockery::mock(TraceeExecutor::class);
$resolver = new TargetProcessResolver($tracee_executor);
$process_specifier = $resolver->resolve(new TargetProcessSettings(123));
$this->assertSame(123, $process_specifier->pid);
$tracee_executor->expects()->execute('command', ['arg1', 'arg2'])->andReturns(456);
$process_specifier = $resolver->resolve(
new TargetProcessSettings(null, 'command', ['arg1', 'arg2'])
);
$this->assertSame(456, $process_specifier->pid);
}
}
Function Calls
None |
Stats
MD5 | 59d9697d485ece4999667997964069a1 |
Eval Count | 0 |
Decode Time | 111 ms |