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 Illuminate\Tests\Database; use Illuminate\Database\Connection; use Illum..
Decoded Output download
<?php
namespace Illuminate\Tests\Database;
use Illuminate\Database\Connection;
use Illuminate\Database\Query\Grammars\SQLiteGrammar;
use Mockery as m;
use PHPUnit\Framework\TestCase;
class DatabaseSQLiteQueryGrammarTest extends TestCase
{
protected function tearDown(): void
{
m::close();
}
public function testToRawSql()
{
$connection = m::mock(Connection::class);
$connection->shouldReceive('escape')->with('foo', false)->andReturn("'foo'");
$grammar = new SQLiteGrammar;
$grammar->setConnection($connection);
$query = $grammar->substituteBindingsIntoRawSql(
'select * from "users" where \'Hello\'\'World?\' IS NOT NULL AND "email" = ?',
['foo'],
);
$this->assertSame('select * from "users" where \'Hello\'\'World?\' IS NOT NULL AND "email" = \'foo\'', $query);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\Database;
use Illuminate\Database\Connection;
use Illuminate\Database\Query\Grammars\SQLiteGrammar;
use Mockery as m;
use PHPUnit\Framework\TestCase;
class DatabaseSQLiteQueryGrammarTest extends TestCase
{
protected function tearDown(): void
{
m::close();
}
public function testToRawSql()
{
$connection = m::mock(Connection::class);
$connection->shouldReceive('escape')->with('foo', false)->andReturn("'foo'");
$grammar = new SQLiteGrammar;
$grammar->setConnection($connection);
$query = $grammar->substituteBindingsIntoRawSql(
'select * from "users" where \'Hello\'\'World?\' IS NOT NULL AND "email" = ?',
['foo'],
);
$this->assertSame('select * from "users" where \'Hello\'\'World?\' IS NOT NULL AND "email" = \'foo\'', $query);
}
}
Function Calls
None |
Stats
MD5 | 484a6928804324c006ea2d9a2e0bf78e |
Eval Count | 0 |
Decode Time | 94 ms |