1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-31 01:29:51 +02:00

Implement config options

This commit is contained in:
Oliver Vogel
2024-05-09 09:58:10 +02:00
parent 55c64ef812
commit fa2bf7d793
31 changed files with 289 additions and 221 deletions

View File

@@ -15,20 +15,20 @@ use PHPUnit\Framework\ExpectationFailedException;
abstract class BaseTestCase extends MockeryTestCase
{
public function getTestResourcePath($filename = 'test.jpg'): string
public static function getTestResourcePath($filename = 'test.jpg'): string
{
return sprintf('%s/resources/%s', __DIR__, $filename);
}
public function getTestResourceData($filename = 'test.jpg'): string
public static function getTestResourceData($filename = 'test.jpg'): string
{
return file_get_contents($this->getTestResourcePath($filename));
return file_get_contents(self::getTestResourcePath($filename));
}
public function getTestResourcePointer($filename = 'test.jpg')
{
$pointer = fopen('php://temp', 'rw');
fputs($pointer, $this->getTestResourceData($filename));
fputs($pointer, self::getTestResourceData($filename));
rewind($pointer);
return $pointer;