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 Intervention\Image\Tests\Unit\Drivers\Gd\Modifi..
Decoded Output download
<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use Intervention\Image\Modifiers\InvertModifier;
use Intervention\Image\Tests\GdTestCase;
#[RequiresPhpExtension('gd')]
#[CoversClass(\Intervention\Image\Modifiers\InvertModifier::class)]
#[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\InvertModifier::class)]
final class InvertModifierTest extends GdTestCase
{
public function testApply(): void
{
$image = $this->readTestImage('trim.png');
$this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex());
$this->assertEquals('ffa601', $image->pickColor(25, 25)->toHex());
$image->modify(new InvertModifier());
$this->assertEquals('ff510f', $image->pickColor(0, 0)->toHex());
$this->assertEquals('0059fe', $image->pickColor(25, 25)->toHex());
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Gd\Modifiers;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use Intervention\Image\Modifiers\InvertModifier;
use Intervention\Image\Tests\GdTestCase;
#[RequiresPhpExtension('gd')]
#[CoversClass(\Intervention\Image\Modifiers\InvertModifier::class)]
#[CoversClass(\Intervention\Image\Drivers\Gd\Modifiers\InvertModifier::class)]
final class InvertModifierTest extends GdTestCase
{
public function testApply(): void
{
$image = $this->readTestImage('trim.png');
$this->assertEquals('00aef0', $image->pickColor(0, 0)->toHex());
$this->assertEquals('ffa601', $image->pickColor(25, 25)->toHex());
$image->modify(new InvertModifier());
$this->assertEquals('ff510f', $image->pickColor(0, 0)->toHex());
$this->assertEquals('0059fe', $image->pickColor(25, 25)->toHex());
}
}
Function Calls
None |
Stats
MD5 | 6a7d7ac3512d992af03a455ad237ad68 |
Eval Count | 0 |
Decode Time | 113 ms |