PhantomJS - http://phantomjs.org/

PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

You can couple it with something like php-PhantomjsRunner (now deprecated) if you want or bake your own.

When setup and ready to start testing with PhantomJS, pick out one of the various Testing Frameworks at your disposal.

I recently also came across this tutorial from tutsplus should it help anyone.


Check out mink and it's support for zombie as a back-end.

It looks quite good, and appears to be well supported.


Edit:

Unfortunately, php has no native javascript interpreter; so if you are looking for a pure php implementation including javascript support, currently, you will not find it. For headless with javascript support, you will have to rely on something like node.js or phantomjs on the back-end.

I'm sure you've seen them already, but for other options that are either headed or lack javascript support, Mink's other backends are worth perusing.