Learning out Loud in Milwaukee, WI

Tag: best practices

  • Writing Integration tests in WordPress

    Integration testing, like unit testing, is a best practice with the goal of evaluating a piece of software’s ability to interface with the rest of a system. Earlier I elaborated on the distinction between integration and unit testing and I won’t repeat myself here. Instead I’ll briefly expand our definition of integration test and demonstrate how to…

  • Using Composer to Manage a WordPress Installation

    The team at Roots.io have a fantastic walkthrough of Composer and why and how you should use it in managing a WordPress site. Composer is a wonderful piece of technology that reduces the headache of figuring out how to managing the individual components of your site to a single file and software solution. With WordPress,…

  • How can I use PHP Namespaces in WordPress Plugins

    PHP has long had a problem of naming collisions. Because older versions of PHP had no way of declaring methods outside the global space, developers came up with several different ways of preventing and checking for namespace collisions, none of which treated the underlying condition. These many and varied solutions begged for a unifying standard…

  • Writing Unit Tests for WordPress

    This post and others like it still get a strange amount of traffic. It’s worth noting the details here are out of date and I won’t be keeping it up. Use at your own risk! In my last post I wrote about two testing libraries for WordPress and briefly discussed the difference between integration tests…

  • Why Unit Testing in WordPress Matters

    Testing WordPress has become a favorite topic of mine lately: moving away from hitting refresh and toward something more holistic, reliable, and automatable. I’ve written before about a testing method called called browser testing, which verifies a webpage has some expected behavior. These kinds of tests are great but they’re not perfect. They require a…

  • How can I use Feature Switches in WordPress

    While a colleague and I were discussing the rollout of a new feature to our public facing website, he asked me if it would be possible to “hide” the new content behind a toggle. Effectively, he was asking me to write a feature switch, a best practice of continuous integration that allows you to push…

  • How can I do Browser Testing With WordPress

    Browser testing is a basic component of a concept called behavior driven development (BDD), and one that has helped me become a better WordPress developer in the last few months. The concept of BDD is simple: test and develop around your software’s expected behavior. I recently wrote about BDD for Excella’s company blog, and this…