If you are not writing tests yet, you should start. Tests will improve the quality of your code, reduce bugs and probably force you to think more about design and quality. Actually, the hardest thing is to start and figure out which type of tests to write.
So you start researching and you find a lot of different materials and get even more confused.Even when you decide what type of tests to use, it can be hard to decide how to test some specific logic in your app.
Don’t give up! We have some tips we learned along the way that will hopefully make your life easier. In this talk you will hear about different test types and when to use them. We’ll also show some tools for checking quality of your test.
Unit testing is a level of testing where individual
units/components are tested. The purpose is to
validate that each separate unit performs as expected.
A unit is the smallest testable part of any software.
It’s not unit tests, it’s you!
Refactor your code using SOLID principles.
The test Http Client in API Platform
Created for PHPUnit
Manipulates the Symfony HttpKernel directly to simulate HTTP requests
Huge performance boost compared to triggering real network requests