mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 08:40:33 +02:00
Optimize tests
This commit is contained in:
@@ -4,20 +4,21 @@ declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Unit\Drivers\Imagick\Analyzers;
|
||||
|
||||
use Intervention\Image\Drivers\Imagick\Analyzers\WidthAnalyzer;
|
||||
use Intervention\Image\Drivers\Imagick\Driver;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
|
||||
use Intervention\Image\Analyzers\WidthAnalyzer;
|
||||
use Intervention\Image\Tests\ImagickTestCase;
|
||||
|
||||
#[RequiresPhpExtension('imagick')]
|
||||
#[CoversClass(\Intervention\Image\Analyzers\WidthAnalyzer::class)]
|
||||
#[CoversClass(\Intervention\Image\Drivers\Imagick\Analyzers\WidthAnalyzer::class)]
|
||||
#[CoversClass(WidthAnalyzer::class)]
|
||||
final class WidthAnalyzerTest extends ImagickTestCase
|
||||
{
|
||||
public function testAnalyze(): void
|
||||
{
|
||||
$image = $this->readTestImage('tile.png');
|
||||
$analyzer = new WidthAnalyzer();
|
||||
$analyzer->setDriver(new Driver());
|
||||
$result = $analyzer->analyze($image);
|
||||
$this->assertEquals(16, $result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user