mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
Add test
This commit is contained in:
23
tests/Analyzers/SpecializableAnalyzerTest.php
Normal file
23
tests/Analyzers/SpecializableAnalyzerTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Analyzers;
|
||||
|
||||
use Intervention\Image\Analyzers\SpecializableAnalyzer;
|
||||
use Intervention\Image\Interfaces\ImageInterface;
|
||||
use Intervention\Image\Tests\TestCase;
|
||||
use Mockery;
|
||||
|
||||
class SpecializableAnalyzerTest extends TestCase
|
||||
{
|
||||
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