test pdf use case

This commit is contained in:
Yisroel Baum 2026-06-26 08:13:46 +03:00
parent 208c683dac
commit b1bee8a16e
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 165 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?php
namespace Tests\Fakes;
use App\Shared\Files\StoredFileReader;
class FakeStoredFileReader implements StoredFileReader
{
/**
* @var array<string, string>
*/
private array $filesByPath = [];
/**
* @var string[]
*/
public array $readPaths = [];
public function put(string $path, string $contents): void
{
$this->filesByPath[$path] = $contents;
}
public function read(string $path): ?string
{
$this->readPaths[] = $path;
return $this->filesByPath[$path] ?? null;
}
}