Useful Magento Template Methods

Useful Magento Template Methods

Magento is, in my opinion, the most powerful e-commerce platform available for PHP. The community edition is completely free, but that comes with a downside. The documentation and the forum are not very helpful. StackOverflow is definitely a great resource…

How To Flush W3 Total Cache Programmatically

How To Flush W3 Total Cache Programmatically

When working with WordPress you will likely need to create custom post types and you will also probably be working with a caching plugin. The problem is that caching plugins typically only flush the cache when normal posts and pages…

Mocking PDO(and other) Objects Inside Already Namespaced Classes

Mocking PDO(and other) Objects Inside Already Namespaced Classes

I’m back again addressing the issue of Mocking PDO and similar objects for unit-testing purposes. My previous post showed how to do so when testing a class that is not namespaced. It basically injected the class being tested into a…