-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Test-Driven Development with PHP 8
By :

Running PHPUnit tests can be very quick. In my experience, even with tens of thousands of unit tests, it can only take a few minutes to run them completely. This is because they only test small parts or units of the solution.
We can also add tests that will call programs that will interact with external web service APIs or databases. Now, imagine how complex those tests are and how long it would take to execute them. If we combine all the complex tests that use multiple object and unit tests into a single group, it will take a lot of time to run the entire group of tests. I’ve experienced working with a company where there are thousands of tests that are all grouped into a single suite – you run the suite and wait an hour, only to find out there’s one broken unit test. That’s very time-consuming and impractical.
Figure 5.13 – Grouping tests
Identifying what a test does and putting it in the right...