V
V
Victor Kapralov2019-08-28 21:46:10
PHP
Victor Kapralov, 2019-08-28 21:46:10

How to do unit tests for controllers and models?

Hello!
Tell me how to learn how to do unit tests for controllers and models. Before that, there was no such experience.
Only he himself, for example, wrote a function that should perform something, calculated what should work and compared my value and what the function returns.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Derepko, 2019-08-28
@Tetrakronos

For controllers, unit tests are no longer written. Acceptance and functional are relevant for them.
The test for models is too abstract a question.
The abstract answer to it is just like you did for the function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question