mirror of
https://github.com/Intervention/image.git
synced 2025-08-28 16:19:50 +02:00
Improve Driver Specializing Process (#1315)
Streamline driver specializing process of analyzers, modifers, encoders and decoders.
This commit is contained in:
22
tests/Unit/Drivers/SpecializableAnalyzerTest.php
Normal file
22
tests/Unit/Drivers/SpecializableAnalyzerTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Unit\Drivers;
|
||||
|
||||
use Intervention\Image\Drivers\SpecializableAnalyzer;
|
||||
use Intervention\Image\Interfaces\ImageInterface;
|
||||
use Intervention\Image\Tests\BaseTestCase;
|
||||
use Mockery;
|
||||
|
||||
final class SpecializableAnalyzerTest extends BaseTestCase
|
||||
{
|
||||
public function testAnalyzer(): void
|
||||
{
|
||||
$analyzer = Mockery::mock(SpecializableAnalyzer::class)->makePartial();
|
||||
$image = Mockery::mock(ImageInterface::class);
|
||||
$image->shouldReceive('analyze')->andReturn('test');
|
||||
$result = $analyzer->analyze($image);
|
||||
$this->assertEquals('test', $result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user