Step 1: Make sure you have the following dependencies in your composer.json and run composer update:
}Step 2: Download PhantomJS and Selenium Server and put them in a new directory 'bin' in your tests folder. (Might not be the most optimum place to stash them but it works for now)
Step 3: Add the following code to your tests folder as TestScaffold.php. It will start the Selenium server if it's not already running and boot up PhantomJS for each test.
Step 4: Write a test that extends the scaffold