media = MediaLibrary::instance(); } public function assertHasFile($file): void { Storage::disk('local')->assertExists("uploads/public/c/{$this->normalizeFilePath($file)}"); } public function assertDoesntHaveFile($file): void { Storage::disk('local')->assertMissing("uploads/public/c/{$this->normalizeFilePath($file)}"); } public function assertFileCount($count, $dir): void { $this->assertCount($count, Storage::disk('local')->files("uploads/public/c/{$this->normalizeFilePath($dir)}")); } public function normalizeFilePath(string $path): string { return preg_replace('|^/*|', '', $path); } }