#87 Possible Method of mocking core classes like PDO

open
nobody
5
2012-04-17
2012-04-17
No

Using namespaces and eval() I have been able to mock objects (like PDO) that are instantiated inside of methods of the class being tested.

I have the example code up on my blog.
http://chrisgriffing.com/coding/php/2012/04/12/how-to-mock-pdo-and-other-objects/

I'm sorry if this seems spammy. Feel free to delete this feature request once someone actively participating in development has seen the technique since it is quite simple.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks