I
I
IgorNoskov2019-05-29 12:22:57
PHP
IgorNoskov, 2019-05-29 12:22:57

How to mimic the $_FILES array when testing with PHPUnit?

Good afternoon!
Please tell me how to simulate the $_FILES array for tests. You need to test a class that validates files uploaded via $_POST.
For validation, the Rakit\Validation\Validator library is used.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Loginov, 2019-05-29
@IgorNoskov

Do not use FILES, POST, etc., psr 7 was made specifically for this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question