Mock private method with PHPUnit

Usually you just don’t test or mock the private & protected methods directy. What you want to test is the public API of your class. Everything else is an implementation detail for your class and should not “break” your tests if you change it. That also helps you when you notice that you “can’t get … Read more