Join InMotion Hosting for $3.49/mo & get a year on Tuts+ FREE (worth $180). Start today.


  • Web Development
    Basic Functional Testing With Symfony 2's CrawlerSymfony2 wide retina preview black
    Follow along as I walk you through using Symfony 2's Crawler to write basic functional tests. We'll learn how to test the entire spectrum of implementing a controller, template, and route by writing functional tests to test their integration as a whole, using PHPUnit.Read More…
  • Programming Fundamentals
    Refactoring Legacy Code - Part 10: Dissecting Long Methods with ExtractionsRefactoring wide retina preview 1
    Today, we will take another approach: We will assume we are alone, no colleague or pair to help us. We will use a technique called "Extract till you drop" that breaks code in very small pieces. We will make all the efforts we can to make these pieces as easy to understand as possibleRead More…
  • PHP
    All About Mocking with PHPUnitMocking in php
    There are two styles of testing: "black box" and "white box" styles. Black box testing focuses on the object's state; whereas, white box testing focuses on behavior. The two styles complement each other and can be combined to thoroughly test code. Mocking allows us to test behavior, and this tutorial combines the mocking concept with TDD to build an example class that uses several other components to achieve its goal.Read More…
  • PHP
    Hands-On Unit Testing With PHPUnitUnit testing
    In this screencast, we'll build a relatively simple class, using TDD techniques. Along the way, we'll discuss various PHPUnit methods, how to create mock objects, and more! I encourage you to work along; it's the best way to learn!Read More…
  • Creative Coding
    The Theory of Unit Testing, Part 3Part3 thumbnail
    In the past two articles, we've taken a close look at the theory behind unit testing and how it can help us in our WordPress development efforts. We've defined unit testing and examined various ways that it can help us throughout our projects. But we still have more to cover. In this final article, we'll review why we should even bother doing unit testing and we'll summarize the advantages and disadvantages of doing it. Next, we'll look at how we can retrofit testing into our existing projects. And to wrap up, we'll summarize a list of resources that are available specifically to us WordPress developers that will aid in beginning to unit test our themes.Read More…
  • Creative Coding
    The Theory of Unit Testing, Part 2Part2 thumbnail
    In the last article, we began talking about the theory of unit testing in WordPress. Specifically, we reviewed our work on unit testing themes and plugins then began to discuss units of code, how this impacts our testing, and we reviewed unit testing in the larger world of software development.Read More…
  • Creative Coding
    The Theory of Unit Testing, Part 1Part1 thumbnail
    We've been looking at unit testing for WordPress development. Through the use of practical examples, we've reviewed what unit testing looks like for both plugins and for themes; however, we haven't really talked about the the theory behind unit testing.Read More…