Working state but no uploads
This commit is contained in:
@@ -10,6 +10,8 @@ use PHPUnit\Framework\TestCase;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
|
||||
|
||||
final class MediaServiceInvalidMimeTest extends TestCase
|
||||
{
|
||||
public function testRejectsNonImageContentEvenWithImageLikeFilename(): void
|
||||
@@ -21,7 +23,7 @@ final class MediaServiceInvalidMimeTest extends TestCase
|
||||
file_put_contents($tmpFile, 'not an image');
|
||||
|
||||
$stream = $this->createMock(StreamInterface::class);
|
||||
$stream->method('getMetadata')->with('uri')->willReturn($tmpFile);
|
||||
$stream->expects($this->once())->method('getMetadata')->with('uri')->willReturn($tmpFile);
|
||||
|
||||
$file = $this->createMock(UploadedFileInterface::class);
|
||||
$file->method('getSize')->willReturn(filesize($tmpFile));
|
||||
|
||||
Reference in New Issue
Block a user