I bring today a solution for automated tests: Make/Accessible.
A lightweight PHP package that let you easily access and test singleton classes and inaccessible instance members like private properties and protected methods.
With this package you can now:
- Call inaccessible methods
- Set values into inaccessible properties
- Get values from inaccessible properties
- Instantiate singleton classes
People complain a lot about encapsulated class members: "Their hard to test! We need to use reflection!" Blablabla... I think i solved this problem.
People also complain a lot about singleton classes: "Their hard to test! We can only have one instance! One change in the instance will also influence other tests!" Blablabla... I think i also solved this problem.
Please, read the usage to better understand witch problems this package solves, I'm open to any criticism and your feedback is really really important to me, or this project will die since I'm not helping anyone! Thanks for read and I'm waiting for your opinion if I'm loosing my time writing it or if i should continue!!!
