It is more useful to see a real-life example so that you can imagine everything that is involved. As a developer, you must know of a brilliant site named Stack Overflow—http://stackoverflow.com. This site is a very good source of information about PHPUnit. It is definitely not only about PHPUnit; it also comprises many developers who have faced similar problems as you, and you can find many answers there. So, if you haven't used it before, you should definitely give it a try.
This site also has an interface that allows you to access its functionality and data through the API and get responses in the JSON format. This is not only very well-documented, but you can also try and see exactly what each method does. Documentation for this is available at https://api.stackexchange.com/docs.
For our example, let's use the search method to find something about PHPUnit.
At https://api.stackexchange.com/docs/search, you can find not only the method description but also...