Skip to content

Commit

Permalink
ColorspaceAnalyzer test
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxetom committed Dec 30, 2024
1 parent d079b59 commit d689be3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/Unit/Analyzers/ColorspaceAnalyzerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace Intervention\Image\Drivers\Vips\Tests\Unit\Analyzers;

use Intervention\Image\Colors\Rgb\Colorspace as Rgb;
use Intervention\Image\Drivers\Vips\Analyzers\ColorspaceAnalyzer;
use Intervention\Image\Drivers\Vips\Driver;
use Intervention\Image\Drivers\Vips\Tests\BaseTestCase;
use Intervention\Image\Interfaces\ColorspaceInterface;
use PHPUnit\Framework\Attributes\CoversClass;

#[CoversClass(ColorspaceAnalyzer::class)]
final class ColorspaceAnalyzerTest extends BaseTestCase
{
public function testAnalyze(): void
{
$image = $this->readTestImage('tile.png');
$analyzer = new ColorspaceAnalyzer();
$analyzer->setDriver(new Driver());
$result = $analyzer->analyze($image);
$this->assertInstanceOf(ColorspaceInterface::class, $result);
$this->assertInstanceOf(Rgb::class, $result);
}
}

0 comments on commit d689be3

Please sign in to comment.