1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-31 17:41:58 +02:00

Optimize tests

This commit is contained in:
Oliver Vogel
2024-12-06 17:32:55 +01:00
parent 69daa96f66
commit b9a16d4df6
120 changed files with 292 additions and 185 deletions

View File

@@ -4,20 +4,21 @@ declare(strict_types=1);
namespace Intervention\Image\Tests\Unit\Drivers\Gd\Analyzers;
use Intervention\Image\Drivers\Gd\Analyzers\HeightAnalyzer;
use Intervention\Image\Drivers\Gd\Driver;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use Intervention\Image\Analyzers\HeightAnalyzer;
use Intervention\Image\Tests\GdTestCase;
#[RequiresPhpExtension('gd')]
#[CoversClass(\Intervention\Image\Analyzers\HeightAnalyzer::class)]
#[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\HeightAnalyzer::class)]
#[CoversClass(HeightAnalyzer::class)]
final class HeightAnalyzerTest extends GdTestCase
{
public function testAnalyze(): void
{
$image = $this->readTestImage('tile.png');
$analyzer = new HeightAnalyzer();
$analyzer->setDriver(new Driver());
$result = $analyzer->analyze($image);
$this->assertEquals(16, $result);
}