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 declare(strict_types=1); namespace Doctrine\DBAL\Tests\Types; use Doctrine\DBAL\P..
Decoded Output download
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Tests\Types;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\SmallIntType;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
class SmallIntTest extends TestCase
{
private AbstractPlatform&MockObject $platform;
private SmallIntType $type;
protected function setUp(): void
{
$this->platform = $this->createMock(AbstractPlatform::class);
$this->type = new SmallIntType();
}
public function testSmallIntConvertsToPHPValue(): void
{
self::assertIsInt($this->type->convertToPHPValue('1', $this->platform));
self::assertIsInt($this->type->convertToPHPValue('0', $this->platform));
}
public function testSmallIntNullConvertsToPHPValue(): void
{
self::assertNull($this->type->convertToPHPValue(null, $this->platform));
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Tests\Types;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\SmallIntType;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
class SmallIntTest extends TestCase
{
private AbstractPlatform&MockObject $platform;
private SmallIntType $type;
protected function setUp(): void
{
$this->platform = $this->createMock(AbstractPlatform::class);
$this->type = new SmallIntType();
}
public function testSmallIntConvertsToPHPValue(): void
{
self::assertIsInt($this->type->convertToPHPValue('1', $this->platform));
self::assertIsInt($this->type->convertToPHPValue('0', $this->platform));
}
public function testSmallIntNullConvertsToPHPValue(): void
{
self::assertNull($this->type->convertToPHPValue(null, $this->platform));
}
}
Function Calls
None |
Stats
MD5 | 19cbe67325f4cd35ddd69ac842a3eacc |
Eval Count | 0 |
Decode Time | 80 ms |