My 4 step PHP TDD setup

I’m now in the process of rebuilding one of my development machines and, in a rush to do it as fast as possible, I’ve put together a guide as a reminder for myself.
I will: * install Xcode and the command line tools
* install homebrew * install composer * install codeception in the project folder

Installing Xcode

It’s as easy as downloading it from the App Store and installing command line tools as detailed by MacPorts guide:

Xcode 4.3 and later do not automatically install the command line tools, but MacPorts requires them. To install them, open the Xcode application, go to the Preferences window, to the Downloads section, and click the Install button next to Command Line Tools. Be sure to return to this window after every Xcode upgrade to ensure that the command line tools are also upgraded.

Installing homebrew

Homebrew makes installing packages a breeze and installing it is as easy, using Mac built in ruby

ruby -e "$(curl -fsSL"

Installing composer

Using the now installed homebrew command I run the commands listed in composer installation instructions

Installing codeception in the project folder

Instead of setting up system-wide installations of the needed testing tools codeception will install them all locally to the project root folder and it all takes the command detailed in codeception installation guide for composer run in the project root folder

composer require "codeception/codeception:*"

And that’s all. Time to test!