Including unit testing in Joomla!
Unit testing is an industry standard that helps you guarantee the quality of your developments. Unit testing consists of testing little parts of your code. The smallest testable parts in PHP are class methods or functions. Unit tests check the logic of your code in a fast and reliable way.
When running unit tests, you do not need your whole application to be running or a connection to a database. You may run your tests directly against your code base, though you may need to set up some environment.
Unit tests should test just one specific action or result in your code. So, when you’re writing your code, you need to focus and create methods that have just one result. This leads to higher-quality code. This is very helpful and has encouraged a development strategy based on testing known as test-driven development (TDD).
What is TDD?
TDD consists of writing the test you want to pass and then writing the code to pass it: