Reflection is one of these language features that most developer may have never used and may never use in their lifetime. And that’s fine! Reflection is there to handle some very specialized cases. It’s not there for fun. But I am sure that many of you may wonder how often this feature is being used…
Tag: mocking
Mocking static methods with Mockery
Sometimes we need to test a method from class A that contain static method calls to another class B. Static calls are always a pain for testing and the discussion about the necessity of static methods or variables can be long. So, let’s concentrate on how can we build such tests. We will use Mockery….