Ed Zynda

Coder | Hacker | Superhero

Test The Untestable With AspectMock

Posted on · Tagged in

Some of us have had the pleasure of working with someone else’s ancient codebase to either add new features or fix bugs. It’s never fun and usually a pain. Because of the design (or lack thereof) of the application, it doesn’t lend itself to unit testing. The code is littered with static method calls, objects instantiated inside methods rather than being injected through a constructor, and other elements of poor design.…

Read more »

Using Repositories In Laravel

Posted on · Tagged in

The past couple of days I have been cramming my brain with coding knowledge. I’m working on a side project that I’ll likely announce in detail as it gets closer to launch. Since I’m starting from an empty Laravel project and building it from the ground up, I’m learning quite a bit about the framework and even some of the new features in PHP 5.4 and above. One technique I’m starting to better understand is that of dependency injection.…

Read more »
Subscribe to my newsletter and get a free copy of my book, Aspect Oriented Programming in PHP.