Even good programmers make mistakes. The difference between a good programmer and a bad programmer is that the good programmer uses tests to detect his mistakes as soon as possible. © Sebastian Bergmann Creator of PHPUnit.

Junior programmers often do not see the point in testing their own code with unit tests. Let's try to understand how to write tests so that they bring only benefits.