mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 04:08:14 +01:00
Move methods to global parent TestCase
This commit is contained in:
parent
41efb89373
commit
b57717da3d
@ -7,6 +7,16 @@ use Mockery\Adapter\Phpunit\MockeryTestCase;
|
||||
|
||||
abstract class TestCase extends MockeryTestCase
|
||||
{
|
||||
public function getTestImagePath($filename = 'test.jpg'): string
|
||||
{
|
||||
return sprintf('%s/images/%s', __DIR__, $filename);
|
||||
}
|
||||
|
||||
public function getTestImageData($filename = 'test.jpg'): string
|
||||
{
|
||||
return file_get_contents($this->getTestImagePath($filename));
|
||||
}
|
||||
|
||||
protected function assertColor($r, $g, $b, $a, ColorInterface $color)
|
||||
{
|
||||
$this->assertEquals($r, $color->red());
|
||||
|
@ -9,16 +9,6 @@ use Intervention\Image\Drivers\Gd\Image;
|
||||
|
||||
trait CanCreateGdTestImage
|
||||
{
|
||||
public function getTestImagePath($filename = 'test.jpg'): string
|
||||
{
|
||||
return sprintf('%s/../images/%s', __DIR__, $filename);
|
||||
}
|
||||
|
||||
public function getTestImageData($filename = 'test.jpg'): string
|
||||
{
|
||||
return file_get_contents($this->getTestImagePath($filename));
|
||||
}
|
||||
|
||||
public function createTestImage($filename = 'test.jpg'): Image
|
||||
{
|
||||
return $this->createWithImageDecoder()->handle(
|
||||
|
Loading…
x
Reference in New Issue
Block a user