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 Barryvdh\Debugbar\Tests\DataFormatter; use Barryvdh\Debugbar\DataFormatt..
Decoded Output download
<?php
namespace Barryvdh\Debugbar\Tests\DataFormatter;
use Barryvdh\Debugbar\DataFormatter\QueryFormatter;
use Barryvdh\Debugbar\Tests\TestCase;
class QueryFormatterTest extends TestCase
{
public function testItFormatsArrayBindings()
{
$bindings = [
'some string',
[
'string',
"Another ' string",
[
'nested',
'array'
]
],
];
$queryFormatter = new QueryFormatter();
$output = $queryFormatter->checkBindings($bindings);
$this->assertSame($output, ["some string", "[string,Another ' string,[nested,array]]"]);
}
public function testItFormatsObjectBindings()
{
$object = new \StdClass();
$object->attribute1 = 'test';
$bindings = [
'some string',
$object
];
$queryFormatter = new QueryFormatter();
$output = $queryFormatter->checkBindings($bindings);
$this->assertSame($output, ['some string', '{"attribute1":"test"}']);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Barryvdh\Debugbar\Tests\DataFormatter;
use Barryvdh\Debugbar\DataFormatter\QueryFormatter;
use Barryvdh\Debugbar\Tests\TestCase;
class QueryFormatterTest extends TestCase
{
public function testItFormatsArrayBindings()
{
$bindings = [
'some string',
[
'string',
"Another ' string",
[
'nested',
'array'
]
],
];
$queryFormatter = new QueryFormatter();
$output = $queryFormatter->checkBindings($bindings);
$this->assertSame($output, ["some string", "[string,Another ' string,[nested,array]]"]);
}
public function testItFormatsObjectBindings()
{
$object = new \StdClass();
$object->attribute1 = 'test';
$bindings = [
'some string',
$object
];
$queryFormatter = new QueryFormatter();
$output = $queryFormatter->checkBindings($bindings);
$this->assertSame($output, ['some string', '{"attribute1":"test"}']);
}
}
Function Calls
None |
Stats
MD5 | f73f3d7796bde091d86d34d3ca2b58c7 |
Eval Count | 0 |
Decode Time | 136 ms |