Testing PHP – Testing File Uploads
Автор: Gary Clarke
Загружено: 2025-09-17
Просмотров: 368
Uploading files is a key part of many web apps - from CVs to invoices to profile pictures. But how do you test it properly in Symfony?
In this video, I’ll walk you through how to test file uploads using Symfony’s `UploadedFile` class inside a real application test.
We’ll cover:
How to use fixture files for predictable, repeatable test data
Simulating file uploads with `UploadedFile` in test mode
Submitting a complete form with a file included
Asserting that a file was uploaded and stored correctly
Validating filenames, extensions, and upload behavior
By the end of this video, you’ll know how to write meaningful tests that verify file uploads work — not just for the happy path, but with confidence they’ll keep working in production.
Learn how to test PHP properly — with PHPUnit, Pest, Laravel and Symfony:
👉 https://www.garyclarke.tech/p/testing...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: