How-to articles, tricks, and solutions about UNIT-TESTING
Best practices to test protected methods with PHPUnit
There are a few ways you can test protected methods using PHPUnit:
How do I test a class that has private methods, fields or inner classes?
To test a class that has private methods, fields, or inner classes, you can do the following:
How do you test that a Python function throws an exception?
You can use the pytest.raises function to test that a Python function throws an exception.